diff --git a/noxfile.py b/noxfile.py index 8199b64a681..f04dd8cc379 100644 --- a/noxfile.py +++ b/noxfile.py @@ -236,11 +236,15 @@ def coverage(session: nox.Session) -> None: if not os.path.exists(".coverage-output"): os.mkdir(".coverage-output") + + # Parallelize coverage as much as possible, by default. + arguments = session.posargs or ["-n", "auto"] + session.run( "pytest", "--cov=pip", "--cov-config=./setup.cfg", - *session.posargs, + *arguments, env={ "COVERAGE_OUTPUT_DIR": "./.coverage-output", "COVERAGE_PROCESS_START": os.fsdecode(Path("setup.cfg").resolve()),