Skip to main content

No project description provided

Project description

pytest-xstress

custom xdist scheduler that runs all tests infinitely.

Usage

$ pytest -nauto --dist loadgroup --xstress

xstress will switch the loadgroup scheduler to its own loadgroupstress scheduler that will run tests forever with its scheduling taking the group constraint into account. Such scheduling algorithm will try to be as fair as possible, which means running tests in an evenly distributed manner.

NOTE: The -n switch is important! Running xdist with only one process effectively runs without test distribution at all.

Example result:

(pytest-xstress-py3.12) ...@macbookpro pytest-xstress % python3 -m pytest test.py -n2 --dist loadgroup --xstress -v
============================= test session starts ==============================
platform darwin -- Python 3.12.2, pytest-8.2.1, pluggy-1.5.0 -- /Users/.../Library/Caches/pypoetry/virtualenvs/pytest-xstress-M8wNAFyb-py3.12/bin/python3
cachedir: .pytest_cache
rootdir: /Users/.../Development/pytest-xstress
configfile: pyproject.toml
plugins: publish-1.0.0, xstress-1.0.0, xdist-3.6.1
created: 2/2 workers

test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 
test.py::_test_single@a 
[gw0] [100%] PASSED test.py::_test_single@a 

...

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

pytest_xstress-1.0.0.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

pytest_xstress-1.0.0-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page