Limit parallel tests with posix jobserver.
Project description
pytest-jobserver
Limit parallel tests with posix jobserver.
Installation
Install with pip:
pip install pytest-jobserver
The plugin officially supports Python >= 3.6 on a Linux OS.
You may find other Python 3 versions/MacOS work as well.
Usage
The plugin uses a POSIX jobserver to manage parallel test loading.
Pass the --jobserver argument with a path, where this path points to a named pipe acting as a jobserver.
You should probably also use pytest-xdist to enable parallelism in the first place:
pytest -n4 --jobserver /opt/jobserver
You can also pass this filepath via the PYTEST_JOBSERVER environment variable.
make
The plugin can also listen for an existing jobserver as created by make.
If a jobserver is not configured by filepath, pytest-jobserver will check the following environment variables in order:
CARGO_MAKEFLAGSMAKEFLAGSMFLAGS
Please note: it is not possible to use one of these environment variables with pytest-xdist. The execnet protocol used by xdist does not support passing file descriptors to remote child processes.
Implementation
This plugin wraps pytest's call to pytest_runtest_protocol, which is called to actually run a collected item on the worker node.
Development
See the top level Makefile and .circleci/config.yml for the development flow. But in essence:
make devto install depsmake lintto lint code (will change files)make testto run lint/unit testsmake integrateto run integration tests
Release
Maintainers can cut a new release by pushing a vX.Y.Z tag to the repo.
Project details
Release history Release notifications | RSS feed
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 pytest_jobserver-1.1.0.tar.gz.
File metadata
- Download URL: pytest_jobserver-1.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
235d1101b6a3defd2d36223ff221aa9c2acc9e32233c7cda3c8320a269452078
|
|
| MD5 |
3c7ce07c927a96713e001da34bbb09ca
|
|
| BLAKE2b-256 |
6df474470708b7e0600610999b5ff89c61bfe72a2e47173d4de44e4f6ad55a0d
|
Provenance
The following attestation bundles were made for pytest_jobserver-1.1.0.tar.gz:
Publisher:
publish.yml on tommilligan/pytest-jobserver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_jobserver-1.1.0.tar.gz -
Subject digest:
235d1101b6a3defd2d36223ff221aa9c2acc9e32233c7cda3c8320a269452078 - Sigstore transparency entry: 901578907
- Sigstore integration time:
-
Permalink:
tommilligan/pytest-jobserver@c2b625003431d81cf9258c1d8c908d034f057f77 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/tommilligan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c2b625003431d81cf9258c1d8c908d034f057f77 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_jobserver-1.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: pytest_jobserver-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b5521e3204f01eba1e2b79407cf3df41397115534a014ca45f769e120d42a10
|
|
| MD5 |
b760b82671b280ffa8e724e4132d97b7
|
|
| BLAKE2b-256 |
e5b048a7165fa51d3c3012ec108e37c759518e431853fc30daed24b377ce3c51
|
Provenance
The following attestation bundles were made for pytest_jobserver-1.1.0-py2.py3-none-any.whl:
Publisher:
publish.yml on tommilligan/pytest-jobserver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_jobserver-1.1.0-py2.py3-none-any.whl -
Subject digest:
4b5521e3204f01eba1e2b79407cf3df41397115534a014ca45f769e120d42a10 - Sigstore transparency entry: 901578984
- Sigstore integration time:
-
Permalink:
tommilligan/pytest-jobserver@c2b625003431d81cf9258c1d8c908d034f057f77 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/tommilligan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c2b625003431d81cf9258c1d8c908d034f057f77 -
Trigger Event:
push
-
Statement type: