rtest
Python test runner built in Rust
What it is and what it does
rtest is a test runner that replaces pytest's import-heavy test collection with Rust-based static AST analysis, eliminating the need to import test modules to discover tests. This yields significant speedups: 5–25x on smaller projects, and 100–200x+ on large monorepos where import overhead dominates. It offers three execution modes: fast collection-only analysis, a native runner for simple test patterns, and pytest-compatible execution that preserves pytest's fixture and conftest.py support while benefiting from rtest's faster collection.
The package is in active early development (v0.0.x) and supports Python 3.10 and later. It ships as compiled wheels across multiple platforms and Python versions. The native runner accepts @rtest.mark.cases and @rtest.mark.skip decorators, plus @pytest.mark.parametrize and @pytest.mark.skip for compatibility. Known limitations include incomplete fixtures support, inability to statically resolve truly dynamic parametrize expressions, and platform-specific path separator handling in test node IDs.
Use it for:
- Speed up test collection on large monorepos where import overhead is the bottleneck
- Run tests in parallel with the native runner on projects using simple test patterns without fixtures
- Replace pytest for projects that don't rely on fixtures or conftest.py
- Accelerate CI/CD pipelines by reducing test discovery time on medium to large codebases
- Benchmark and profile test collection performance across different test suites
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python test runner built in Rust that uses static AST analysis for fast test collection and supports parallel test execution, with optional pytest compatibility.
Yes, if you have a medium to large test suite and can tolerate early-stage tooling. The speedups are substantial and well-documented. Install with caution if your tests depend heavily on pytest fixtures or conftest.py—the native runner doesn't support these yet, though pytest-compatible execution mode does. Not recommended for small projects where collection time is negligible, or for teams requiring production-grade stability.
Install
rtest on PyPI
pip
pip install rtestuv
uv add rtestpoetry
poetry add rtestInstalling rtest
Before you install
Medium install friction due to compiled wheels for multiple Python versions and platforms. Active maintenance with recent releases; project is in early development (v0.0.x) so expect breaking changes and evolving features.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install rtest
# Fast collection
rtest --collect-only
# Run with native runner
rtest --runner native
# Parallel execution
rtest --runner native -n 4
Requires Python 3.10 or later. Native runner does not support pytest fixtures or conftest.py; use --runner pytest for fixture-dependent tests.
Verify before relying
- Whether native runner fixtures support is complete or still in development
- Compatibility with complex pytest plugins beyond basic parametrize/skip markers
- Whether cross-module constant resolution for @rtest.mark.cases is fully implemented
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 175 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 263,437/month — #8,356 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: rtest-0.0.46-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; rtest-0.0.46-cp310-cp310-manylinux_2_34_aarch64.whl; rtest-0.0.46-cp310-cp310-win_amd64.whl; rtest-0.0.46-cp311-cp311-macosx_10_12_x86_64.whl; rtest-0.0.46-cp311-cp311-macosx_11_0_arm64.whl; rtest-0.0.46-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; rtest-0.0.46-cp311-cp311-manylinux_2_34_aarch64.whl; rtest-0.0.46-cp311-cp311-win_amd64.whl; rtest-0.0.46-cp312-cp312-macosx_10_12_x86_64.whl; rtest-0.0.46-cp312-cp312-macosx_11_0_arm64.whl; rtest-0.0.46-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; rtest-0.0.46-cp312-cp312-manylinux_2_34_aarch64.whl; rtest-0.0.46-cp312-cp312-win_amd64.whl; rtest-0.0.46-cp313-cp313-macosx_10_12_x86_64.whl; rtest-0.0.46-cp313-cp313-macosx_11_0_arm64.whl; rtest-0.0.46-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; rtest-0.0.46-cp313-cp313-manylinux_2_34_aarch64.whl; rtest-0.0.46-cp313-cp313t-manylinux_2_34_aarch64.whl; rtest-0.0.46-cp313-cp313-win_amd64.whl; rtest-0.0.46-cp314-cp314-macosx_10_12_x86_64.whl
Keywords: testing, pytest, rust, performance
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pytest-cacheA pytest plugin that persists test state across…
permissive · top 15,000 on PyPI
pytest-asyncio-concurrentA pytest plugin that executes async test…
permissive · top 15,000 on PyPI
pytest-aioA pytest plugin that automatically runs async…
permissive · top 15,000 on PyPI
stestrstestr is a parallel test runner for Python…
permissive · top 15,000 on PyPI
pytest-grpcA pytest plugin that provides fixtures to write…
permissive · top 15,000 on PyPI
pytest-deadfixturesA pytest plugin that identifies unused and…
permissive · top 5,000 on PyPI
pytest-pytestrailA pytest plugin that decorates test functions…
permissive · top 15,000 on PyPI
pytest-rerunfailuresA pytest plugin that automatically reruns…
copyleft · top 1,000 on PyPI
snob-libSnob analyzes your Python project's dependency…
permissive · top 15,000 on PyPI