Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a sentence to CONTRIBUTING how to run tests in parallel #375

Open
hagenw opened this issue Apr 25, 2023 · 0 comments
Open

Add a sentence to CONTRIBUTING how to run tests in parallel #375

hagenw opened this issue Apr 25, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@hagenw
Copy link
Member

hagenw commented Apr 25, 2023

By using the pytest-xdist package one can execute tests in parallel, e.g.

$ python -m pytest -n 4

reduces the test execution time from 26.26s to 17.42s for me.

The only problem is that pytest-xdist does not work with every test definition.
When adding it to CONTRIBUTING, we should also add a test for running it in CI, looking at https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources there seems to be the option to use at least 2 workers.

@hagenw hagenw added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant