Configures mutmut for Python mutation testing - `pip install mutmut`, runs via `mutmut run`, browses results via `mutmut browse` or `mutmut results`, applies surviving mutants to disk via `mutmut apply {id}`, suppresses with `# pragma: no mutate` annotations. Configures via `setup.cfg` / `pyproject.toml` with `source_paths` + per-test selection. Use for Python codebases needing mutation-quality verification of pytest / unittest suites.
75
94%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Detailed pitfalls and constraints for mutmut-mutation. Linked inline from that skill's SKILL.md.
| Anti-pattern | Why it fails | Fix |
|---|---|---|
# pragma: no mutate as escape hatch | Hides untested code; defeats mutation testing. | Reserve pragmas for genuinely unreachable / untestable code. |
| Running on every PR (full mutation) | Long; team disables. | Schedule weekly + per-PR scoped via a wrapper script. |
Including third-party packages in source_paths | Mutates code you don't own. | Scope to project source only. |
Skipping mutmut results in CI | No visibility into the score over time. | Pipe to an artifact + dashboard. |
| Setting unrealistic mutation-score gates | Forces the team to write low-value tests. | Start at the current baseline; ratchet up by 1-2pp per quarter. |
git diff -> --paths-to-mutate.pragma: no mutate for the specific fixtures.