pytest-parallel
a pytest plugin for parallel and concurrent testing
What?
This plugin makes it possible to run tests quickly using multiprocessing (parallelism) and multithreading (concurrency).
Why?
pytest-xdist is great to run tests that:
- aren't threadsafe
- perform poorly when multithreaded
- need state isolation
pytest-parallel is better for some use cases (like Selenium tests) that:
- can be threadsafe
- can use non-blocking IO for http requests to make it performant
- manage little or no state in the Python environment
Put simply, pytest-xdist does parallelism while pytest-parallel does parallelism and concurrency.
Requirements
- Python3 version [3.6+]
- Unix or Mac for
--workers - Unix, Mac, or Windows for
--tests-per-worker
Installation
pip install pytest-parallel
Options
workers(optional) - max workers (aka processes) to start. Can be a positive integer orautowhich uses one worker per core. Defaults to 1.tests-per-worker(optional) - max concurrent tests per worker. Can be a positive integer orautowhich evenly divides tests among the workers up to 50 concurrent tests. Defaults to 1.
Examples
# runs 2 workers with 1 test per worker at a time
pytest --workers 2
# runs 4 workers (assuming a quad-core machine) with 1 test per worker
pytest --workers auto
# runs 1 worker with 4 tests at a time
pytest --tests-per-worker 4
# runs 1 worker with up to 50 tests at a time
pytest --tests-per-worker auto
# runs 2 workers with up to 50 tests per worker
pytest --workers 2 --tests-per-worker auto
License
MIT
Metadata
Release files for pytest-parallel 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pytest-parallel-0.0.8.tar.gz | 5.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_parallel-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 kB
Release files / pytest-parallel-0.0.8.tar.gz
| Download URL | pytest-parallel-0.0.8.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16c9e4ed0e345d267787f90986b3200749d205a698de607d5bd3242cfbd595d8
|
|
BLAKE2b-256 checksum How to use checksums |
f9c31738be1d1224c79a1f45f8b104446220243d88940be672e7d72584b098e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Release files / pytest_parallel-0.0.8-py3-none-any.whl
| Download URL | pytest_parallel-0.0.8-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a63577a3595a678ab69d292b93a72e249227ae51acf3f3fe0c283742299e12e8
|
|
BLAKE2b-256 checksum How to use checksums |
7edde0f8b5aa5f469a7751f156578e3821c378a80bcf96d25fdfd988f4193b6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Security for pytest-parallel 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.