Skip to content
SPECIFICTION
Get listed

pymute

github.com

Free plan Linux
Visit github.com
Spec score 7.7 #9 of 25 in Mutation Testing Tools

What it is

pymute is a free mutation testing tool for Python projects using pytest or tox, written in Rust. It creates a temporary directory for each mutant and changes Python file text rather than operating on the abstract syntax tree. Pytest is the default runner, and documented mutation types include math operators, conjunctions, booleans, control flow, comparisons and numbers. By default, it reports mutants that survive because tests pass; other output levels can show caught mutants or process output. Options let users filter modules with a glob, select tests and mutation types, set thread count and cap the number of mutants. That cap runs a randomly selected subset. Installation uses Cargo from crates.io or GitHub and requires Rust and Cargo. With pytest, tests need to run from the project root in independent copies and exercise the local copy rather than an installed package. Tox sets up a separate environment and installs the package for each mutant, which the project describes as considerably slower. Parallel threads each need temporary disk space, and a run may fail if /tmp runs out. The repository identifies its license as Unlicense.

Spec sheet

Purpose
Pymute is a mutation testing tool for Python and Pytest written in Rust.Read 8 Oct 2026 · github.com
License
The repository identifies its license as Unlicense.Read 8 Oct 2026 · github.com
Maker
The Cargo manifest names Leonard Sasse as the author.Read 8 Oct 2026 · github.com
Configuration
Users can restrict mutations by module glob, select tests, choose mutation types, set thread count, and cap the number of mutants.Read 7 Oct 2026 · github.com
Distribution
The README says to install pymute using Cargo from crates.io or directly from GitHub, and requires Rust and Cargo.Read 8 Oct 2026 · github.com
How it works
It creates a temporary directory for each mutant and inserts mutations by manipulating text in Python files rather than operating on the AST.Read 7 Oct 2026 · github.com
Installation
The README says to install pymute with Cargo from crates.io or directly from GitHub, and requires Rust and Cargo.Read 7 Oct 2026 · github.com
Mutation approach
It creates a temporary directory for each mutant and inserts mutations by editing Python file text rather than operating on the AST.Read 8 Oct 2026 · github.com
Mutation types
Its listed mutation types include math operators, conjunctions, booleans, control flow, comparison operators, and numbers.Read 8 Oct 2026 · github.com
Output
By default, it displays mutants that tests missed, with optional caught and process output levels.Read 8 Oct 2026 · github.com
Parallelism
The --num-threads option controls how many mutants run in parallel, and each thread uses temporary disk space.Read 8 Oct 2026 · github.com
Project layout constraint
With pytest, the project’s tests need to run from the project root in independent copies and test the local copy rather than an installed package.Read 7 Oct 2026 · github.com
Pytest requirement
With pytest, tests should run from the project root in independent project copies and test the local copy rather than an installed package.Read 8 Oct 2026 · github.com
Resource use
The README notes that each parallel thread needs temporary disk space and may fail if /tmp runs out of space.Read 7 Oct 2026 · github.com
Sampling
The --max-mutants option runs a randomly sampled subset of mutants.Read 8 Oct 2026 · github.com
Scoping
The --modules option filters files using a glob, and files named test_* or ending in *_test.py are automatically excluded.Read 8 Oct 2026 · github.com
Test runners
It supports pytest as the default runner and tox as an alternative.Read 8 Oct 2026 · github.com
Test selection
The --tests option runs selected tests, which the README recommends for quicker iteration on specific modules.Read 8 Oct 2026 · github.com
Tox limitation
Tox sets up a virtual environment and installs the package for each mutant, which the README says is considerably slower.Read 8 Oct 2026 · github.com
tox tradeoff
The README says tox creates a separate virtual environment and installs the package for each mutant, but is considerably slower because environments must be set up.Read 7 Oct 2026 · github.com
Version
The repository Cargo manifest lists version 0.2.1 and author Leonard Sasse.Read 7 Oct 2026 · github.com

Plans and prices

Free/open-source Free Install with Cargo; requires Rust and Cargo Read 8 Oct 2026 · github.com

Every pymute plan and price →

Strong points and limits

Strong points

  • Free to install with Cargo
  • Supports pytest and tox
  • Can run mutants in parallel
  • Filters modules and selects tests
  • Reports surviving mutants by default

Limits

  • Requires Rust and Cargo
  • Each parallel thread needs temporary disk space
  • tox runs are considerably slower
  • pytest tests must target local project copies

Who it suits

pymute suits Python developers who want mutation testing with pytest or tox and can install Rust and Cargo. Its pytest workflow assumes tests run from the project root against local project copies.

Verdict

pymute offers configurable mutation testing for Python with pytest or tox, including parallel execution and reports of surviving mutants. Installation requires Rust and Cargo, and users should account for pytest's local-copy setup and temporary disk requirements.

Where Specifiction places it

Alternatives to pymuteAll alternatives →