Skip to content

Commit ee5b186

Browse files
authored
test: Pre-compile common wheels in base test env (#13715)
The test suite disables Python bytecode caching so if we don't pre-compile the bytecode for coverage, setuptools, and pytest-subket which are all preinstalled in the test environments, we pay a heavy import time penalty (e.g., setuptools during a PEP 517 build). pip is already pre-compiled, FWIW. This is doubly bad for coverage and pytest-subket since they are imported on every Python process startup. Locally, this shaves a full minute from a full test suite run down to 2:45 from 3:45.
1 parent e5fd9e4 commit ee5b186

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ def _common_wheel_editable_install(
420420
},
421421
interpreter=sys.executable,
422422
script_kind="posix",
423+
bytecode_optimization_levels=[0],
423424
),
424425
additional_metadata={},
425426
)

0 commit comments

Comments
 (0)