pytest-xdist scheduler that runs some tests on dedicated workers. can significantly improve runtime by running long tests on separate workers.
Project description
xdist-scheduling-exclusive
pytest-xdist scheduler that runs some tests on dedicated workers.
Can significantly improve runtime by running long tests on separate workers.
Installation
pip install xdist-scheduling-exclusive pytest-xdist
Usage
To integrate with your pytest setup, update conftest.py as follows:
from xdist_scheduling_exclusive import ExclusiveLoadScopeScheduling
def pytest_xdist_make_scheduler(config, log):
"""xdist-pytest hook to set scheduler."""
return ExclusiveLoadScopeScheduling(config, log)
Available Schedulers:
ExclusiveLoadSchedulingSchedule tests fromexclusive_tests.txtfirst and on dedicated nodes.ExclusiveLoadFileScheduling: Place tests fromexclusive_tests.txtto uniquescopes. Other tests are grouped as in--dist loadfile: tests from the same file run on the same node.ExclusiveLoadScopeScheduling: Schedule tests fromexclusive_tests.txtfirst and on dedicated nodes. Other tests are grouped as in--dist loadfile: tests from the same file run on the same node.
Optimizing for Long-Running Tests:
To identify long-running tests for the exclusive list, utilize pytest's --durations option to sort tests by execution time.
Developers
Do not forget to run . ./activate.sh.
To see how tests were scheduled use something like
python -m pytest -n 4 --xdist-report -s
Scripts
make help
Coverage report
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xdist_scheduling_exclusive-1.1.0.tar.gz.
File metadata
- Download URL: xdist_scheduling_exclusive-1.1.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fedb07a4bf323d811b987396684c5cc8b165fe953a994d4217a4f670cab9cee
|
|
| MD5 |
ceceabb4d0ab8de3bc12e37cd86e830d
|
|
| BLAKE2b-256 |
8265bbd60a75881ce1cccf1b1748fd6b93965b648e89b962be574d17d7371603
|
File details
Details for the file xdist_scheduling_exclusive-1.1.0-py3-none-any.whl.
File metadata
- Download URL: xdist_scheduling_exclusive-1.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5aea7a5bfc5c1715d766c07feaed2d3d8eafbd09d70a661763a94e4a481b4b51
|
|
| MD5 |
596b795425e7a48419d8dd79caa6a170
|
|
| BLAKE2b-256 |
c68e909a20cd3d3074dd2e0a4461e8bbde11ca81d2507e7eda851a297f0f90ad
|