Skip to content

Commit 097709b

Browse files
authored
Add a coverage session to our noxfile
That way, we can move from tox to Nox without problems. See #6721 for details.
1 parent c6037c7 commit 097709b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

noxfile.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,22 @@ def pinned_requirements(path: Path) -> Iterator[Tuple[str, str]]:
223223
release.commit_file(session, ".", message=message)
224224

225225

226+
227+
@nox.session
228+
def coverage(session: nox.Session):
229+
session.run(
230+
"python",
231+
"-c",
232+
"'import os, sys; os.path.exists(sys.argv[1]) or os.mkdir(sys.argv[1])'",
233+
"./.coverage-output"
234+
)
235+
session.run(
236+
"pytest",
237+
"--cov=pip",
238+
"--cov-config=./setup.cfg"
239+
)
240+
241+
226242
# -----------------------------------------------------------------------------
227243
# Release Commands
228244
# -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)