Rust-powered, drop-in replacement for pytest
Project description
rpytest
Run your pytest suite faster. Change nothing.
A Rust-powered, drop-in replacement for pytest that eliminates startup overhead while keeping your tests, fixtures, and plugins untouched.
Why rpytest?
pytest -> 2.91s (480 tests)
rpytest -> 1.55s (same 480 tests)
= 1.9x faster
rpytest uses a persistent Rust daemon to keep Python warm between runs. No more interpreter startup costs on every invocation.
Installation
pip install rpytest
That's it. The correct native binary for your platform (macOS or Linux, Intel or Apple Silicon) is bundled automatically.
Usage
rpytest mirrors pytest's CLI exactly. If you know pytest, you know rpytest.
# Run all tests
rpytest
# Run specific tests
rpytest tests/test_api.py::test_login
# Filter by keyword or marker
rpytest -k "auth" -m "not slow"
# Parallel execution — no pytest-xdist needed
rpytest -n auto
# Watch mode for TDD
rpytest --watch
Key Features
| Feature | pytest | rpytest |
|---|---|---|
| Startup time | ~200ms | <10ms |
| Memory usage | 35.8 MB | 6.2 MB |
| Parallel workers | pytest-xdist plugin | Built-in -n flag |
| Watch mode | pytest-watch plugin | Built-in --watch |
| Flakiness detection | flaky plugin | Built-in --reruns |
| Sharding | pytest-shard plugin | Built-in --shard |
- Full pytest compatibility — plugins, fixtures, conftest.py, pytest.ini all work unchanged
- Built-in parallelism —
rpytest -n 4orrpytest -n auto - Watch mode — file changes trigger automatic re-runs of affected tests
- Flakiness detection —
rpytest --reruns 3auto-retries failed tests - Session fixture reuse —
rpytest --reuse-fixturespersists expensive fixtures - CI sharding —
rpytest --shard 0 --total-shards 4
Requirements
- Python 3.9+
- pytest 7.0+
- macOS or Linux
How It Works
- First run: Spawns a background daemon that collects your test suite
- Subsequent runs: Rust CLI filters tests and dispatches to warm Python workers
- Results stream back in real-time
The daemon persists between runs, so TDD loops and CI retries skip all startup work.
Documentation
Full docs at docs.neullabs.com/rpytest
License
MIT
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 rpytest-0.1.2.tar.gz.
File metadata
- Download URL: rpytest-0.1.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
744de856d66b5e482c697ec44bb1b3a0a7394d2fe81d10ff4cbae8d0a3779d69
|
|
| MD5 |
e7b1ad8d7be81dc69b674694f2916628
|
|
| BLAKE2b-256 |
2233912d609cd58be9bd7a336b01f0c0f06a10e07d2ccbc1c04c14a69efd89f1
|
File details
Details for the file rpytest-0.1.2-py3-none-any.whl.
File metadata
- Download URL: rpytest-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87ce986c541709706e86564755b36a65f392949362b5c3c6799f84216ad3356c
|
|
| MD5 |
dae5144d615398d0ad6de4132ac769af
|
|
| BLAKE2b-256 |
1339a9a6286fb0a104099203778a23505644c63bf1fba0741976c6c80fc84b36
|