rstest
Run your existing pytest suite in parallel, unchanged. Same fixtures,
same plugins, same outcomes — just faster. Rust-orchestrated, parallel by
default, with built-in suite diagnostics (--doctor) that tell you where
your test time actually goes.
aiohttp, 4,469 tests: pytest 197s → rstest 68s
📚 Full documentation → python-rstest.readthedocs.io
Quick start
In any pytest project:
pip install rstest # or: uv pip install rstest
rstest
Also works with your tool of choice:
uv add rstest # uv projects
poetry add rstest # Poetry
pdm add rstest # PDM
pipx install rstest # isolated CLI install
No config. No test changes. If pytest runs it, rstest runs it — in
parallel (-n auto), out of the box.
- Tests that can't run in parallel →
@pytest.mark.serial(run exclusively, after the parallel phase). - Order-dependent suites →
--dist loadfile. - Want byte-exact pytest semantics →
rstest -n 0(single pytest session).
Benchmarks
Real open-source suites, end-to-end, with per-test outcome diffing against the pytest baseline — 100% parity.
| Suite | Tests | pytest | xdist (-n 8) |
rstest |
|---|---|---|---|---|
| aiohttp | 4,469 | 197s | 160s | 68s |
| pandas | 193,627 | 182s | 61s | 63s |
| django-allauth | 2,050 | 22s | 8s | 8s (-n 4) |
| rich | 981 | 3.4s | 2.8s | 2.5s (-n 4) |
Apple Silicon, CPython 3.13, pytest-xdist 3.8. Full methodology and monorepo numbers: benchmarks.
Why rstest
| pytest | pytest-xdist | rstest | |
|---|---|---|---|
| Runs your suite unchanged | ✅ | mostly | ✅ |
| Parallel by default | ❌ | ⚙️ opt-in | ✅ |
| Duration-aware scheduling | ❌ | ❌ | ✅ |
| Crashed workers respawn mid-run | ❌ | ❌ | ✅ |
| Suite diagnostics | ❌ | ❌ | ✅ --doctor |
| Watch mode | plugin | ❌ | ✅ built-in |
- Drop-in. Forwards the pytest flag surface; runs conftest, fixtures, parametrize, marks, and pytest plugins (pytest-django, pytest-asyncio, hypothesis, …) through a vendored pytest core.
- Parallel by design. Test-granular work distribution with duration-aware
scheduling;
@pytest.mark.serialand--dist loadfilesafety rails; crashed workers respawn without losing your run. rstest --doctor. Wait-bound tests, parallel-floor analysis, fixture hotspots, slowest files.rstest --watch. Instant reruns on save; changed test files rerun alone, source changes rerun only the tests the import graph says are affected.
Compatibility contract
At -n 0, outcomes are byte-exact. In parallel modes, outcomes are
preserved for parallel-safe tests; tests with hidden
time/ordering/shared-state assumptions can flake under high concurrency —
exactly as under pytest-xdist. rstest --doctor and lower -n values help
find and contain them; @pytest.mark.serial is the escape hatch.
rstest --doctor
Runs your suite, then answers where does the time actually go? — from data the runner already owns (per-test wall/CPU time, per-fixture setup):
================== rstest doctor ==================
4442 tests, 185.8s test time (wall 67.7s, 8 workers)
WAIT-BOUND: 95% of test time (176.5s) is waiting, not computing (sleeps / IO / timeouts).
54.20s waiting of 54.25s tests/test_proxy_functional.py::test_proxy_https_multi_conn_limit
... and 33 more
PARALLEL FLOOR: the longest test (54.2s) exceeds the ideal per-worker share (23.2s at -n 8);
no worker count can finish faster than its longest test.
FIXTURE HOTSPOTS (setup time across all workers):
0.79s 4442x scope=function blockbuster
SLOWEST FILES:
150.46s (81.0%) tests/test_proxy_functional.py
===================================================
That's aiohttp's real suite — one file is 81% of total test time, almost all of it waiting on 10-second proxy timeouts. More →
Docs
- Getting started
- Migrating from pytest
- Migrating from pytest-xdist
- Parallel safety
- Suite diagnostics (
--doctor) - Watch mode
- CI quickstart
- CLI reference
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 rstest-0.4.0-py3-none-win_arm64.whl.
File metadata
- Download URL: rstest-0.4.0-py3-none-win_arm64.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcb811b0599582d31c514f05268c29f11ecb99d46dff5180cffcdc759bfade95
|
|
| MD5 |
e067692b77ea28bea61a64a40fcc80ec
|
|
| BLAKE2b-256 |
b298d5c433c3c1d493d6710b041571608129b482e86bff612f4bf03c6f8a805f
|
Provenance
The following attestation bundles were made for rstest-0.4.0-py3-none-win_arm64.whl:
Publisher:
release.yml on KovantAI/rstest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rstest-0.4.0-py3-none-win_arm64.whl -
Subject digest:
fcb811b0599582d31c514f05268c29f11ecb99d46dff5180cffcdc759bfade95 - Sigstore transparency entry: 2665869251
- Sigstore integration time:
-
Permalink:
KovantAI/rstest@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/KovantAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Trigger Event:
push
-
Statement type:
File details
Details for the file rstest-0.4.0-py3-none-win_amd64.whl.
File metadata
- Download URL: rstest-0.4.0-py3-none-win_amd64.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3738ef7441dd3ba105d048a63362e0418732a81e19334b7d754f9b5c8533cc8
|
|
| MD5 |
c947ae6adcf8da4b8f28c53e3566e2ed
|
|
| BLAKE2b-256 |
5b8202d056e4929b99631d0033963b39f0b0c8309fb07d83802ec82dbb6d2cf9
|
Provenance
The following attestation bundles were made for rstest-0.4.0-py3-none-win_amd64.whl:
Publisher:
release.yml on KovantAI/rstest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rstest-0.4.0-py3-none-win_amd64.whl -
Subject digest:
b3738ef7441dd3ba105d048a63362e0418732a81e19334b7d754f9b5c8533cc8 - Sigstore transparency entry: 2665869301
- Sigstore integration time:
-
Permalink:
KovantAI/rstest@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/KovantAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Trigger Event:
push
-
Statement type:
File details
Details for the file rstest-0.4.0-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: rstest-0.4.0-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0881f0355059a13d052f225c9c81c13ba7e89a146c2886d07bbc8734feb74446
|
|
| MD5 |
d143d0637826be9fd73b92a2d37c3d35
|
|
| BLAKE2b-256 |
4dcbdca2e7e9d39a24f7c24f1dcbe0b67d455843fc177162bad6b81093f91abd
|
Provenance
The following attestation bundles were made for rstest-0.4.0-py3-none-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on KovantAI/rstest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rstest-0.4.0-py3-none-musllinux_1_2_x86_64.whl -
Subject digest:
0881f0355059a13d052f225c9c81c13ba7e89a146c2886d07bbc8734feb74446 - Sigstore transparency entry: 2665869277
- Sigstore integration time:
-
Permalink:
KovantAI/rstest@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/KovantAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Trigger Event:
push
-
Statement type:
File details
Details for the file rstest-0.4.0-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: rstest-0.4.0-py3-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
867a979d610c786c7e42668e26ca0cf94cde51c346df508347c019787b7581da
|
|
| MD5 |
6de4e29575a6fcd8e4be6948f5f23841
|
|
| BLAKE2b-256 |
63316f669f7ab07aaace50b5c98d4ec16305d8731396fae01f35138af19465fe
|
Provenance
The following attestation bundles were made for rstest-0.4.0-py3-none-musllinux_1_2_aarch64.whl:
Publisher:
release.yml on KovantAI/rstest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rstest-0.4.0-py3-none-musllinux_1_2_aarch64.whl -
Subject digest:
867a979d610c786c7e42668e26ca0cf94cde51c346df508347c019787b7581da - Sigstore transparency entry: 2665869388
- Sigstore integration time:
-
Permalink:
KovantAI/rstest@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/KovantAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Trigger Event:
push
-
Statement type:
File details
Details for the file rstest-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rstest-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c4e13a368580904a37bb69e4e8d940ee7cd706d47ab2cb11b193df74d783149
|
|
| MD5 |
91e1d9e0e4342a30914c02e4181442fe
|
|
| BLAKE2b-256 |
11815cb541a3be48d9781e5f8dc689c0d2a220d0a815870589edb5469adcdec1
|
Provenance
The following attestation bundles were made for rstest-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on KovantAI/rstest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rstest-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
5c4e13a368580904a37bb69e4e8d940ee7cd706d47ab2cb11b193df74d783149 - Sigstore transparency entry: 2665869227
- Sigstore integration time:
-
Permalink:
KovantAI/rstest@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/KovantAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Trigger Event:
push
-
Statement type:
File details
Details for the file rstest-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: rstest-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d6b890eced34ea66b0e1d7a012c5e6dee1918d06f00357f495d2ce2e62e4794
|
|
| MD5 |
d77eba5746b497bdaa1e1db0e472d5b8
|
|
| BLAKE2b-256 |
07efda02b96c222c19c7809cfb9ddc5444f29f4ba8b6be9ba585e2f79429f2ea
|
Provenance
The following attestation bundles were made for rstest-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on KovantAI/rstest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rstest-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
5d6b890eced34ea66b0e1d7a012c5e6dee1918d06f00357f495d2ce2e62e4794 - Sigstore transparency entry: 2665869344
- Sigstore integration time:
-
Permalink:
KovantAI/rstest@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/KovantAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Trigger Event:
push
-
Statement type:
File details
Details for the file rstest-0.4.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: rstest-0.4.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
620f5b16da681ffc7812983aaee22d29c08155606d8807fdfbd1bc6bbc3a07fa
|
|
| MD5 |
d900949b5220bc256c2579d1462b10c7
|
|
| BLAKE2b-256 |
c01eb8766c8176a89778c83feb4dd77c4d4de0e50efee4b49018e966463a8bbf
|
Provenance
The following attestation bundles were made for rstest-0.4.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on KovantAI/rstest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rstest-0.4.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
620f5b16da681ffc7812983aaee22d29c08155606d8807fdfbd1bc6bbc3a07fa - Sigstore transparency entry: 2665869192
- Sigstore integration time:
-
Permalink:
KovantAI/rstest@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/KovantAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a03ddd83decd8934874d5200f5fd3a3c641e47a -
Trigger Event:
push
-
Statement type: