A fast, drop-in compatible pytest runner written in Rust
Project description
pytest-rs
pytest-rs is a re-implementation of the popular Python testing framework pytest in Rust, focused on speed: a drop-in compatible runner where startup, collection, fixture orchestration, coverage measurement, and reporting are native code, while test bodies run on embedded CPython.
Note: This project is currently in active development (alpha stage). Many features are still under implementation and subject to change. See docs/DESIGN.md for the architecture and roadmap.
pytest-rs is an independent project, not affiliated with or endorsed by the pytest project.
Installation
Prebuilt wheels are published to PyPI for Linux (x86_64 / aarch64) and macOS (arm64) on CPython 3.13 / 3.14:
uv add --dev pytest-rs # or: pip install pytest-rs
Then run your existing suite, no changes needed:
pytest-rs # whole suite, like `pytest`
pytest-rs tests/test_foo.py # one file
pytest-rs -n 4 # parallel workers (pytest-xdist compatible)
pytest-rs --cov=mypkg # native coverage (pytest-cov compatible)
pytest-rs reads the same configuration pytest does (pytest.ini, pyproject.toml [tool.pytest.ini_options], tox.ini, setup.cfg) and understands the familiar flags (-v, -x, -k, -m, --lf, --tb=..., -p no:NAME, ...). It installs alongside pytest without conflict — the pytest command is untouched.
Requirements
- Linux or macOS (no Windows support yet)
- CPython 3.13+ built with a shared libpython — true for uv-managed Pythons, python.org installers, Homebrew, conda, and distro packages. Plain pyenv builds need
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install ....
Bundled plugins
The compatibility layers for pytest-asyncio, pytest-mock, pytest-cov, pytest-split, pytest-benchmark and pytest-xdist-style -n parallelism are built in — no separate plugin installs. Two ways to turn features off:
Per project or per run, like pytest (works with the prebuilt wheel):
[tool.pytest.ini_options]
addopts = "-p no:benchmark -p no:split"
At build time, when installing from source — bundled plugins are Cargo features, all enabled by default:
[tool.uv]
config-settings-package = { pytest-rs = { build-args = "--no-default-features --features asyncio,mock" } }
Performance
Native startup, collection, fixture orchestration, parallel workers (fork-based) and coverage measurement. Where it pays off:
- suites with heavy fixture/parametrize orchestration and large collections
--covruns (a native collector instead of a tracing hook)-nparallel runs (fork workers instead of spawned interpreters)
For small, CPU-bound suites the test bodies dominate and pytest-rs runs at parity with pytest. Try it on your own suite:
hyperfine -w 1 'pytest -q' 'pytest-rs'
Known limitations
- unix only (no Windows)
- no
--pdb/ debugger integration yet - third-party pytest plugins are loaded via the
pytest11entry point and thepytestAPI shim; plugins reaching deep into pytest internals may not work
Conformance testing
Compatibility is verified by running the upstream test suites of the libraries pytest-rs reproduces, unchanged, under pytest-rs (conformance/).
Current results (total = passed + failed + errors + skipped; updated automatically by conformance/runner.py, refreshed by CI on every push to main — see conformance/RESULTS.md for per-file detail):
linux (CI-verified)
| suite | tag | passed | failed | errors | skipped | total | pass % | files all-pass | files run | files excluded |
|---|---|---|---|---|---|---|---|---|---|---|
| pytest | 9.0.3 | 1182 | 835 | 0 | 22 | 2039 | 58.0% | 5 | 45 | 63 |
| pytest-asyncio | v1.4.0 | 262 | 0 | 1 | 0 | 263 | 99.6% | 29 | 30 | 0 |
| pytest-mock | v3.15.1 | 85 | 0 | 0 | 5 | 90 | 94.4% | 1 | 1 | 0 |
| pytest-cov | v7.1.0 | 47 | 159 | 0 | 3 | 209 | 22.5% | 0 | 1 | 0 |
| pytest-xdist | v3.8.0 | 62 | 36 | 0 | 0 | 98 | 63.3% | 0 | 1 | 6 |
| pytest-split | 0.9.0 | 59 | 0 | 0 | 0 | 59 | 100.0% | 1 | 1 | 3 |
| pytest-benchmark | v5.1.0 | 40 | 82 | 0 | 1 | 123 | 32.5% | 2 | 7 | 6 |
The suites are included as shallow git submodules under conformance/suites/ at the pinned release tags. Initialize them once after cloning:
git submodule update --init --depth 1
Then run the full conformance harness:
cargo build
uv run --no-project python conformance/runner.py --local # uses submodules
uv run --no-project python conformance/runner.py # re-clones from upstream (CI mode)
| Project | License | Tag |
|---|---|---|
| pytest | MIT | 9.0.3 |
| pytest-asyncio | Apache-2.0 | v1.4.0 |
| pytest-mock | MIT | v3.15.1 |
| pytest-cov | MIT | v7.1.0 |
| pytest-xdist | MIT | v3.8.0 |
| pytest-split | MIT | 0.9.0 |
| pytest-benchmark | BSD-2-Clause | v5.1.0 |
pytest-rs reimplements the public APIs of these projects. Parts of the bundled Python shims are ports of upstream code; see THIRD-PARTY-NOTICES.md. Credit for the API design and the test suites belongs to their respective authors.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
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 Distributions
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_rs-0.0.1.tar.gz.
File metadata
- Download URL: pytest_rs-0.0.1.tar.gz
- Upload date:
- Size: 237.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
572c652f91e8bca8f2656b371ab6f68277b21e8cd4462b43883af264637f95d3
|
|
| MD5 |
3d564328116105c53ebc62fa2af01889
|
|
| BLAKE2b-256 |
4fa71ba71b22ba46048766a8ac8175e717528eae5a12b99568708098d8e837f8
|
Provenance
The following attestation bundles were made for pytest_rs-0.0.1.tar.gz:
Publisher:
release.yml on Yasu-umi/pytest-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_rs-0.0.1.tar.gz -
Subject digest:
572c652f91e8bca8f2656b371ab6f68277b21e8cd4462b43883af264637f95d3 - Sigstore transparency entry: 1738858822
- Sigstore integration time:
-
Permalink:
Yasu-umi/pytest-rs@ab69612fac01a4ac296186d6c776dad493e4d40d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Yasu-umi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ab69612fac01a4ac296186d6c776dad493e4d40d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_rs-0.0.1-cp314-cp314-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pytest_rs-0.0.1-cp314-cp314-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.14, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c532d8cbf4c34f208e70cfb49d1281ab440482ae5a05c308012d364597375ea
|
|
| MD5 |
655c94b44ed78e280bec70c417871214
|
|
| BLAKE2b-256 |
7527c708baaf479afa2eb4d3a07e1010a8fc424863c3a05b06ec373aa6391f0d
|
Provenance
The following attestation bundles were made for pytest_rs-0.0.1-cp314-cp314-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on Yasu-umi/pytest-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_rs-0.0.1-cp314-cp314-manylinux_2_28_x86_64.whl -
Subject digest:
1c532d8cbf4c34f208e70cfb49d1281ab440482ae5a05c308012d364597375ea - Sigstore transparency entry: 1738859017
- Sigstore integration time:
-
Permalink:
Yasu-umi/pytest-rs@ab69612fac01a4ac296186d6c776dad493e4d40d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Yasu-umi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ab69612fac01a4ac296186d6c776dad493e4d40d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_rs-0.0.1-cp314-cp314-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pytest_rs-0.0.1-cp314-cp314-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.14, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f77ac663532125d3f5050c3b96b8b8f39036346c6d435874d05e378f14462382
|
|
| MD5 |
896e941fd946cc8afddd01dc42659d4f
|
|
| BLAKE2b-256 |
9dac1b3778fe22b0f37a592d4aa2ce4d0b78f5b553a10c01270927608d4951e7
|
Provenance
The following attestation bundles were made for pytest_rs-0.0.1-cp314-cp314-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on Yasu-umi/pytest-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_rs-0.0.1-cp314-cp314-manylinux_2_28_aarch64.whl -
Subject digest:
f77ac663532125d3f5050c3b96b8b8f39036346c6d435874d05e378f14462382 - Sigstore transparency entry: 1738859115
- Sigstore integration time:
-
Permalink:
Yasu-umi/pytest-rs@ab69612fac01a4ac296186d6c776dad493e4d40d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Yasu-umi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ab69612fac01a4ac296186d6c776dad493e4d40d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_rs-0.0.1-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: pytest_rs-0.0.1-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2b1340f5305fcb1467b627dc254b02233dcb2c0397c99963f36ece6196730b3
|
|
| MD5 |
325c8b9a3f93bebfe0c9b54eba0612fd
|
|
| BLAKE2b-256 |
b69fddc39c7b11117ede079bb845b3b789962fa9167cddeeffce9403711950b2
|
Provenance
The following attestation bundles were made for pytest_rs-0.0.1-cp314-cp314-macosx_11_0_arm64.whl:
Publisher:
release.yml on Yasu-umi/pytest-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_rs-0.0.1-cp314-cp314-macosx_11_0_arm64.whl -
Subject digest:
a2b1340f5305fcb1467b627dc254b02233dcb2c0397c99963f36ece6196730b3 - Sigstore transparency entry: 1738858943
- Sigstore integration time:
-
Permalink:
Yasu-umi/pytest-rs@ab69612fac01a4ac296186d6c776dad493e4d40d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Yasu-umi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ab69612fac01a4ac296186d6c776dad493e4d40d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_rs-0.0.1-cp313-cp313-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pytest_rs-0.0.1-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a632454ae052d15dfd50005de1f95dcb06d0f55aa6fb85ee58d493af92f99ae
|
|
| MD5 |
5e7d8365c6f51b44f3803a5280aafb27
|
|
| BLAKE2b-256 |
332280b109d19ad92811da5d26ba508d12928a58a9b6a7c00230b83208ecd5e0
|
Provenance
The following attestation bundles were made for pytest_rs-0.0.1-cp313-cp313-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on Yasu-umi/pytest-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_rs-0.0.1-cp313-cp313-manylinux_2_28_x86_64.whl -
Subject digest:
3a632454ae052d15dfd50005de1f95dcb06d0f55aa6fb85ee58d493af92f99ae - Sigstore transparency entry: 1738859082
- Sigstore integration time:
-
Permalink:
Yasu-umi/pytest-rs@ab69612fac01a4ac296186d6c776dad493e4d40d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Yasu-umi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ab69612fac01a4ac296186d6c776dad493e4d40d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_rs-0.0.1-cp313-cp313-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pytest_rs-0.0.1-cp313-cp313-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf663d0f8ea53490d4ddee821683cfb4574d0a83c4b6c57775ab65e15f21073d
|
|
| MD5 |
ac62744e912b135ee95f3342db596ea3
|
|
| BLAKE2b-256 |
fbacfe2c863fe6046ddf1cbe3d85076c53ddf4ec4551d8ee0361011395af39ed
|
Provenance
The following attestation bundles were made for pytest_rs-0.0.1-cp313-cp313-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on Yasu-umi/pytest-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_rs-0.0.1-cp313-cp313-manylinux_2_28_aarch64.whl -
Subject digest:
bf663d0f8ea53490d4ddee821683cfb4574d0a83c4b6c57775ab65e15f21073d - Sigstore transparency entry: 1738859042
- Sigstore integration time:
-
Permalink:
Yasu-umi/pytest-rs@ab69612fac01a4ac296186d6c776dad493e4d40d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Yasu-umi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ab69612fac01a4ac296186d6c776dad493e4d40d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_rs-0.0.1-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: pytest_rs-0.0.1-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8652176a2fcb63c54261235d256bbc135897ff1de9d0fa2b09949434673beb2f
|
|
| MD5 |
568dd0dbc674ad68916732e4347890d9
|
|
| BLAKE2b-256 |
a9c17c39d34af206ffdad29d6d63e025f2928c64f5614bd5e7cc948da8448530
|
Provenance
The following attestation bundles were made for pytest_rs-0.0.1-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
release.yml on Yasu-umi/pytest-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_rs-0.0.1-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
8652176a2fcb63c54261235d256bbc135897ff1de9d0fa2b09949434673beb2f - Sigstore transparency entry: 1738859139
- Sigstore integration time:
-
Permalink:
Yasu-umi/pytest-rs@ab69612fac01a4ac296186d6c776dad493e4d40d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Yasu-umi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ab69612fac01a4ac296186d6c776dad493e4d40d -
Trigger Event:
push
-
Statement type: