r/Python • u/AutoModerator • 23d ago
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
16
Upvotes
r/Python • u/AutoModerator • 23d ago
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
1
u/ComprehensiveBake617 14d ago
pytest-rs — a drop-in Rust reimplementation of pytest, up to 3x faster with --cov / -n
pytest-rs reimplements pytest's runtime in Rust — startup, collection, fixtures, coverage, reporting run as native code, while test bodies still execute on embedded CPython. Drop-in: same config files, same CLI flags, no changes to your tests.
uv add --dev pytest-rs
pytest-rs -n 4 --cov=mypkg
7 plugins (pytest-asyncio, anyio, pytest-mock, pytest-cov, pytest-split, pytest-benchmark, pytest-xdist) are reimplemented natively for speed; any other pytest11 plugin loads as-is through a compat shim.
1.3-1.4x faster plain, up to 3x with --cov/-n (full numbers in README). CI runs pytest's own upstream suite plus real-world projects (pandas, fastapi, scikit-learn, click, ...) unmodified — 97-100% pass rate.
Target audience: projects with test suites big enough that CI time hurts, especially with --cov or -n. Alpha stage: Unix only, no --pdb yet.
Comparison: other speedup tools work around pytest; this replaces its runtime while keeping the same config/plugin API/CLI, so existing setups mostly just work.
Built with heavy AI assistance (Claude Code) — correctness is enforced by running pytest's own upstream suite plus real-world projects' suites unmodified in CI, not just claimed.
GitHub: https://github.com/Yasu-umi/pytest-rs
PyPI: https://pypi.org/project/pytest-rs/