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

Python: Improve test performance by running tests in parallel #1364

Closed
m-strzelczyk opened this issue Mar 3, 2022 · 1 comment
Closed

Python: Improve test performance by running tests in parallel #1364

m-strzelczyk opened this issue Mar 3, 2022 · 1 comment
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@m-strzelczyk
Copy link
Contributor

When working on code samples in Python language, I'm often irritated by how long it takes to run the full test suite for my PRs. I'd love to have support for pytest-xdist or pytest-parallel in the noxfiles that we force-sync in our Python repositories. All tests should always be written in a way, that they don't rely on any order and don't interfere with each other, so this should not cause any problems.

I'll provide a PR that supports those pytest extensions for review in a moment.

According to tests run on my local machine on the python-compute repository, the time it takes to run all tests for samples can be reduced to 5 minutes from almost half an hour IIRC.

m-strzelczyk added a commit that referenced this issue Mar 3, 2022
Closing #1364

Auto-add parameters for `pytest` when we detect that `pytest-xdist` or `pytest-parallel` are installed through the `requirements.txt` or `requirements-test.txt` files.

Setting the options to auto, as we can't assume what's the best number would be for the various environments the tests will run on.
@busunkim96 busunkim96 added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Mar 3, 2022
m-strzelczyk added a commit that referenced this issue Mar 4, 2022
Closing #1364

Auto-add parameters for `pytest` when we detect that `pytest-xdist` or `pytest-parallel` are installed through the `requirements.txt` or `requirements-test.txt` files.

Setting the options to auto, as we can't assume what's the best number would be for the various environments the tests will run on.
@parthea
Copy link
Contributor

parthea commented Mar 8, 2022

Closed via #1365

@parthea parthea closed this as completed Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants