Skip to content

Commit 4a772b5

Browse files
committed
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.
1 parent adff230 commit 4a772b5

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

tests/test_venv.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,16 @@ def testp():
134134
print("Plugin here")
135135
""")
136136

137-
# Install the third-party packages.
138-
run_in_venv("python -m pip install --no-index ./third_pkg")
139-
run_in_venv("python -m pip install --no-index -e ./another_pkg")
140-
run_in_venv("python -m pip install --no-index -e ./bug888/app -e ./bug888/plugin")
141-
shutil.rmtree("third_pkg")
142-
143-
# Install coverage.
137+
# Install everything.
144138
coverage_src = nice_file(TESTS_DIR, "..")
145-
run_in_venv(f"python -m pip install --no-index {coverage_src}")
139+
run_in_venv(
140+
"python -m pip install --no-index " +
141+
"./third_pkg " +
142+
"-e ./another_pkg " +
143+
"-e ./bug888/app -e ./bug888/plugin " +
144+
coverage_src
145+
)
146+
shutil.rmtree("third_pkg")
146147

147148
return venv_world
148149

0 commit comments

Comments
 (0)