summaryrefslogtreecommitdiff
path: root/noxfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'noxfile.py')
-rw-r--r--noxfile.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/noxfile.py b/noxfile.py
index 9de795fe5..b7d3d8253 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -229,15 +229,23 @@ def vendoring(session: nox.Session) -> None:
@nox.session
def coverage(session: nox.Session) -> None:
- if not os.path.exists("./.coverage-output"):
- os.mkdir("./.coverage-output")
+ # Install source distribution
+ run_with_protected_pip(session, "install", ".")
+
+ # Install test dependencies
+ run_with_protected_pip(session, "install", "-r", REQUIREMENTS["tests"])
+
+ if not os.path.exists(".coverage-output"):
+ os.mkdir(".coverage-output")
session.run(
"pytest",
"--cov=pip",
"--cov-config=./setup.cfg",
+ *session.posargs,
env={
"COVERAGE_OUTPUT_DIR": "./.coverage-output",
- "COVERAGE_PROCESS_START": "./setup.cfg",
+ "COVERAGE_PROCESS_START": os.fsdecode(Path("setup.cfg").resolve()),
+ "SETUPTOOLS_USE_DISTUTILS": "stdlib",
},
)