An extremely fast mutation testing tool for Python
Maintained. Last release 9 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity and contributor spread.
pip install fest-mutatefest
An extremely fast mutation testing tool for Python.
fest generates small changes (mutants) to your Python source code and checks whether your test suite catches them. Surviving mutants reveal gaps that line coverage alone cannot find.
Built in Rust with ruff's Python parser. ~25× faster than cosmic-ray on real-world projects (benchmark).
Highlights
- 🔥 Parallel execution — runs mutants across all CPU cores simultaneously
- 🎯 Coverage-guided — only runs tests that cover the mutated line, via per-test
pytest-covcontext - ⚡ In-process plugin — a persistent pytest worker pool avoids per-mutant startup overhead
- 🧬 17 mutation operators — arithmetic, comparison, boolean, return value, constants, decorators, loops, and more
- 📊 Multiple output formats — text, JSON, and self-contained HTML reports
- 🔄 Session support — stop and resume long runs with SQLite-backed sessions
Installation
From PyPI (recommended)
pip install fest-mutate
From source
git clone https://github.com/sakost/fest.git
cd fest
cargo build --release
The binary will be at target/release/fest. Make sure pytest and pytest-cov are installed in
the Python environment you want to test:
pip install pytest pytest-cov
Quick start
cd your-python-project
fest run