mutmut

mutmut.readthedocs.io ↗

Mutate Python code and rerun its tests to find changes the suite fails to catch.

SI Score
80/100
Pricing
Open Source AI reading, not confirmed
Free plan
Not confirmed
Sign-up required
Not confirmed

Ask SI about mutmut

Answers use saved listing facts and recorded sources.
Homepage screenshot
Screenshot of the mutmut homepage

What it does

mutmut is a mutation-testing system for Python that modifies code in small ways, runs the project's tests, and lets developers inspect the resulting mutants. The official guide starts with a Python project and pytest, then uses `mutmut browse` to review survivors and rerun tests after changes. The project license is BSD 3-Clause.

A practical first pass starts with an existing Python project whose tests pass. The official guide shows installing mutmut, running the mutation process, then opening mutmut browse to inspect surviving changes. A developer can select a surviving mutant, write a test intended to catch it, and rerun the analysis. mutmut can resume a run, which is useful when a larger suite takes time, but mutation testing still adds work on top of ordinary tests. The project guide recommends keeping the code under version control and committing before using commands that apply a mutant to disk. That safeguard matters because mutation tools deliberately alter source files. The official repository publishes a BSD 3-Clause license. The record describes the Python testing tool and does not infer a fee for third-party hosting or CI services that may run it.

Strengths

  • The tool reuses an existing pytest suite to check whether tests detect changed behavior.
  • The browse workflow helps developers inspect and retest surviving mutants.
  • The official repository publishes a BSD 3-Clause license.

Watch out for

  • The workflow expects an existing Python test suite and can take longer than a standard test run.
  • Mutation application can modify files, so the documentation recommends committing the source before applying mutants.
  • The tool is specific to Python projects rather than a cross-language mutation runner.

Best for

  • Python teams that want to measure whether pytest cases detect small code changes.
  • Developers looking for concrete surviving mutations to guide additional assertions.
  • Projects that can run tests repeatedly and protect source changes with version control.

Sources