summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-10-31 08:54:33 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-10-31 09:17:16 -0400
commit4a772b5194262fdbe61db6d7ae03ddb70707f3cc (patch)
tree60396aadfdf7ac9043391181b26643bfaba89ae1
parentadff2305cdb1ef83078777c3019c8220fbb703ac (diff)
downloadpython-coveragepy-git-4a772b5194262fdbe61db6d7ae03ddb70707f3cc.tar.gz
perf(test): run pip just once, shaves 1.2s off the fixture
... though that means it's 8.1s instead of 9.3s, so still pretty slow.
-rw-r--r--tests/test_venv.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/test_venv.py b/tests/test_venv.py
index dfe10b59..f3455411 100644
--- a/tests/test_venv.py
+++ b/tests/test_venv.py
@@ -134,15 +134,16 @@ def venv_world_fixture(tmp_path_factory):
print("Plugin here")
""")
- # Install the third-party packages.
- run_in_venv("python -m pip install --no-index ./third_pkg")
- run_in_venv("python -m pip install --no-index -e ./another_pkg")
- run_in_venv("python -m pip install --no-index -e ./bug888/app -e ./bug888/plugin")
- shutil.rmtree("third_pkg")
-
- # Install coverage.
+ # Install everything.
coverage_src = nice_file(TESTS_DIR, "..")
- run_in_venv(f"python -m pip install --no-index {coverage_src}")
+ run_in_venv(
+ "python -m pip install --no-index " +
+ "./third_pkg " +
+ "-e ./another_pkg " +
+ "-e ./bug888/app -e ./bug888/plugin " +
+ coverage_src
+ )
+ shutil.rmtree("third_pkg")
return venv_world