pymute vs pytest-gremlins
pymute
github.compytest-gremlins
github.comSide by side
| Figure | pymute | pytest-gremlins |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Linux | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Mutation Testing Tools | 7.7 (#9) | 7.7 (#10) |
| Configuration | Users can restrict mutations by module glob, select tests, choose mutation types, set thread count, and cap the number of mutants. | Options can be configured through `pyproject.toml` or command-line flags, and mutations can be pardoned with an inline pragma. |
| Installation | The README says to install pymute with Cargo from crates.io or directly from GitHub, and requires Rust and Cargo. | The project documents installation with pip, uv, and Poetry. |
| License | The repository identifies its license as Unlicense. | The project is MIT licensed. |
| Purpose | Pymute is a mutation testing tool for Python and Pytest written in Rust. | pytest-gremlins is a pytest plugin that injects small code mutations and checks whether tests catch them. |
Plans
In their own words
pymute
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.
pytest-gremlins
pytest-gremlins is a pytest plugin for checking whether an existing test suite catches small changes to code. It runs mutation tests against Python projects and can report results in the console, HTML, or JSON, including multiple formats in one run. Getting started requires Python 3.11 or later, pytest 7.0 or later, and existing tests; installation is documented with pip, uv, and Poetry. The project’s quick-start command is `pytest --gremlins`. To manage execution, it uses mutation switching, coverage-guided test selection, incremental analysis, and parallel execution, and it works with pytest-xdist. Options can be set in `pyproject.toml` or with command-line flags, while inline pragmas can pardon specific mutations. A GitHub Action can run the checks and fail a workflow if its score misses a threshold; CI examples also cover GitLab CI, CircleCI, and Dagger. It is a free, MIT-licensed package for Linux, classified as Alpha. The guide warns that an initial run may take 10–100 times as long as a normal test run, though caching can shorten later runs. It also notes that equivalent mutations can make a perfect score unattainable and unnecessary.