Remove xdist from requirements and pytest config #3212
Merged
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.
Checklist
GitHub
PR contents
Description
This PR removes the default usage of
pytest-xdist
when running the unit tests. See minutes from dev meeting:Motivation: we have hit some limitations/issues with regards to concurrency issues (Session-Scoped Fixtures are not Session-Scoped with Pytest-Xdist pytest-dev/pytest-xdist#271 (comment), Fix test download concurrency bug. #3152). This complicates the ongoing effort to port CI to github actions (Port CI to Github Actions #3125, Fix test download concurrency bug. #3152)
Other annoyances such as xdist disabling
-s
(--capture=no
) thus preventing the user from viewing the output ofstdout
which is confusing for users. (Relevant dev Wiki page about this issue.)xdist
for local testing, for example.Doesn’t add value in CI since almost all VMs are single-core.
Alternatives:
pytest-parallel
(to be evaluated)CI time on GH actions: total ~15min; on Travis: ~1hr
In a nutshell: there is not a lot of value added (at the moment) in using
xdist
and working around the issues mentioned above. Tests can happily run sequentially and it won't make a difference for 99% of the people. People who do care about parallelization can still usexdist
locally.