Skip to content

Commit 722c17c

Browse files
Modify pytest coverage to use coverage command instead
1 parent 345679e commit 722c17c

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

noxfile.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,21 @@ def default(session, path):
130130
session.install("-r", "requirements.txt")
131131
# Run pytest with coverage.
132132
session.run(
133+
"coverage",
134+
"run",
135+
"--include=*/google/cloud/alloydb/connector/*.py",
136+
"-m",
133137
"pytest",
134-
"--cov=google.cloud.alloydb.connector",
135138
"-v",
136-
"--cov-config=.coveragerc",
137-
"--cov-report=",
138-
"--cov-fail-under=0",
139-
"--junitxml=sponge_log.xml",
140139
path,
141140
*session.posargs,
142141
)
142+
session.run(
143+
"coverage",
144+
"xml",
145+
"-o",
146+
"sponge_log.xml",
147+
)
143148

144149

145150
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)

0 commit comments

Comments
 (0)