Registry / testing / rtest
library0.0.46pypypi✓ verified 25d ago

Rtest is a high-performance Python test runner built in Rust. It replaces traditional import-heavy test collection with static Abstract Syntax Tree (AST) analysis, significantly speeding up test discovery, especially in large monorepos. Currently in early development (v0.0.x), it aims for `pytest` compatibility while offering performance gains and parallel test execution.

pip install rtest
INSTALL
IMPORT
SIG · RTEST
R
rtest
testingpythonv0.0.46
Install
2.4s avg
Import
Disk
23MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.46 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 22MB
23MB installed
● package 23MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rtest command-line tool
rtest [options] [path...]
Rtest is primarily a command-line test runner. While it provides utility functions like `rtest.raises()`, the core interaction is via the `rtest` command.

Create a test file (e.g., `my_tests/test_example.py`) with standard Python test functions. Run `rtest` from your terminal, pointing it to your test directory or files. Rtest will discover and execute the tests.

# my_tests/test_example.py def test_addition(): assert 1 + 1 == 2 def test_failing_example(): assert 'hello'.upper() == 'HELLO' # To run these tests from your terminal: # Navigate to your project root (e.g., one level above my_tests) # $ pip install rtest # $ rtest my_tests # Example with a specific rtest utility: # from rtest import raises # # def test_raises_exception(): # with raises(ValueError, match='invalid literal'): # int('abc')
rtest --version
Debug
Known issues
breakingRtest is in early development (v0.0.x); expect frequent bugs, breaking changes, and evolving features as it progresses towards stability.
fix
Refer to the GitHub changelog for specific version updates and breaking changes. Pinning versions and testing upgrades is recommended.
affects: All versions < 1.0.0
gotchaPath Separator Differences: Rtest uses platform-specific path separators (e.g., `\` on Windows) in test nodeids, unlike `pytest` which normalizes to forward slashes (`/`). This can affect tools or scripts parsing test output.
fix
Be aware of platform differences when parsing or comparing test nodeids in CI/CD pipelines or custom reporting tools.
affects: All versions
gotchaCollection Failures on Complex Codebases: Projects with extensive use of `pytest` plugins, dynamic imports, or metaclass-heavy patterns may fail during rtest collection, even if they work with `pytest`.
fix
If collection fails, try simplifying test module structure, reducing dynamic imports, or consider using `rtest --runner pytest` which leverages pytest for execution while still benefiting from rtest's collection.
affects: All versions
gotcha`--runner native` Limitations: The native test runner is limited to simple test patterns (e.g., `unittest.TestCase`, plain assertions) and currently lacks full support for `pytest` fixtures or `conftest.py`.
fix
For projects relying on `pytest` fixtures, use `rtest --runner pytest` to execute tests. Full fixture support for the native runner is under development.
affects: All versions
gotchaLimited Parametrized Test Discovery: Rtest only expands parametrized tests during collection when decorator arguments can be statically resolved (e.g., literal values, module-level constants, enum members). Dynamic expressions may not be discovered.
fix
Ensure parametrized arguments are statically resolvable for rtest to discover them. Refactor complex dynamic parameter generation if tests are not being collected.
affects: All versions
Upgrade
Version history
0.0.46latest on PyPI · released Feb 20, 2026
Audit
Dependencies
pythonrequiredRequires Python 3.10 or newer.
Agent activity
15 hits · last 30 days
node
14
Resources
rtest — pip install rtest · libregistry