Repository navigation
test(python): run the test suite in parallel with pytest-xdist - #85
Merged
Merged
Conversation
Deploying lance-csr with
|
| Latest commit: |
3bd182d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://aa350854.lance-csr.pages.dev |
| Branch Preview URL: | https://chore-pytest-xdist.lance-csr.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Python suite runs one test at a time, so a 4-core CI runner and a multi-core laptop both sit mostly idle during
make test. Running the tests across worker processes makes the local loop and the Python Tests CI job faster without changing any test.What changed
pytest-xdistjoins thedevdependency group, somake installbrings it in.make testand the Python Tests workflow run pytest with-n auto, one worker per core.PYTEST_ARGS="-n 0"still runs the suite serially when debugging a single test, since the later-nwins.Validation
Local timings on an Apple Silicon laptop with the debug build, the same 1645 tests passing in each run:
-n 4(the CI runner's core count)-n autouv lock --checkpasses; the lockfile adds onlypytest-xdistandexecnet.uvx typos@1.26.0 .passes.main, and I expect it to drop to about 25s.🤖 Generated with Claude Code