Skip to main content

rstest

CI codecov PyPI Python versions Wheel License Downloads Docs GitHub stars

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.serial and --dist loadfile safety 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

License

Licensed under either of

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rstest-0.4.0-py3-none-win_arm64.whl (2.4 MB view details)

Uploaded Python 3Windows ARM64

rstest-0.4.0-py3-none-win_amd64.whl (2.6 MB view details)

Uploaded Python 3Windows x86-64

rstest-0.4.0-py3-none-musllinux_1_2_x86_64.whl (3.1 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

rstest-0.4.0-py3-none-musllinux_1_2_aarch64.whl (2.9 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

rstest-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

rstest-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

rstest-0.4.0-py3-none-macosx_11_0_arm64.whl (2.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

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

Hashes for rstest-0.4.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 fcb811b0599582d31c514f05268c29f11ecb99d46dff5180cffcdc759bfade95
MD5 e067692b77ea28bea61a64a40fcc80ec
BLAKE2b-256 b298d5c433c3c1d493d6710b041571608129b482e86bff612f4bf03c6f8a805f

See more details on using hashes here.

Provenance

The following attestation bundles were made for rstest-0.4.0-py3-none-win_arm64.whl:

Publisher: release.yml on KovantAI/rstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for rstest-0.4.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b3738ef7441dd3ba105d048a63362e0418732a81e19334b7d754f9b5c8533cc8
MD5 c947ae6adcf8da4b8f28c53e3566e2ed
BLAKE2b-256 5b8202d056e4929b99631d0033963b39f0b0c8309fb07d83802ec82dbb6d2cf9

See more details on using hashes here.

Provenance

The following attestation bundles were made for rstest-0.4.0-py3-none-win_amd64.whl:

Publisher: release.yml on KovantAI/rstest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rstest-0.4.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rstest-0.4.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0881f0355059a13d052f225c9c81c13ba7e89a146c2886d07bbc8734feb74446
MD5 d143d0637826be9fd73b92a2d37c3d35
BLAKE2b-256 4dcbdca2e7e9d39a24f7c24f1dcbe0b67d455843fc177162bad6b81093f91abd

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rstest-0.4.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for rstest-0.4.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 867a979d610c786c7e42668e26ca0cf94cde51c346df508347c019787b7581da
MD5 6de4e29575a6fcd8e4be6948f5f23841
BLAKE2b-256 63316f669f7ab07aaace50b5c98d4ec16305d8731396fae01f35138af19465fe

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rstest-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rstest-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5c4e13a368580904a37bb69e4e8d940ee7cd706d47ab2cb11b193df74d783149
MD5 91e1d9e0e4342a30914c02e4181442fe
BLAKE2b-256 11815cb541a3be48d9781e5f8dc689c0d2a220d0a815870589edb5469adcdec1

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rstest-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rstest-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5d6b890eced34ea66b0e1d7a012c5e6dee1918d06f00357f495d2ce2e62e4794
MD5 d77eba5746b497bdaa1e1db0e472d5b8
BLAKE2b-256 07efda02b96c222c19c7809cfb9ddc5444f29f4ba8b6be9ba585e2f79429f2ea

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rstest-0.4.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rstest-0.4.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 620f5b16da681ffc7812983aaee22d29c08155606d8807fdfbd1bc6bbc3a07fa
MD5 d900949b5220bc256c2579d1462b10c7
BLAKE2b-256 c01eb8766c8176a89778c83feb4dd77c4d4de0e50efee4b49018e966463a8bbf

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

7 files

0.3.1

7 files

0.2.1

7 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page