diff options
author | Diego Ramirez <dr01191115@gmail.com> | 2021-11-27 08:42:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-27 08:42:03 -0600 |
commit | 7c3fd811a632dce14a5138dd21c0d5a279cdda87 (patch) | |
tree | 74b529d4a33efef7a939f8a2f5ca249dc2c1fba3 /noxfile.py | |
parent | 097709b967444cf3638c56ef960a4de034b700e4 (diff) | |
download | pip-7c3fd811a632dce14a5138dd21c0d5a279cdda87.tar.gz |
Make some fixes to the `coverage` Nox session
- Simplify it, by replacing a run with a Python if statement.
- Pass an env argument to the coverage call to ensure it will work.
Diffstat (limited to 'noxfile.py')
-rw-r--r-- | noxfile.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/noxfile.py b/noxfile.py index 9721eb634..4a8b94608 100644 --- a/noxfile.py +++ b/noxfile.py @@ -226,16 +226,16 @@ def vendoring(session: nox.Session) -> None: @nox.session def coverage(session: nox.Session): - session.run( - "python", - "-c", - "'import os, sys; os.path.exists(sys.argv[1]) or os.mkdir(sys.argv[1])'", - "./.coverage-output" - ) + if not os.path.exists("./.coverage-output"): + os.mkdirs("./coverage-output") session.run( "pytest", "--cov=pip", "--cov-config=./setup.cfg" + env={ + "COVERAGE_OUTPUT_DIR": "./coverage-output", + "COVERAGE_PROCESS_START": "./setup.cfg", + } ) |