mutation-testing-python

Run mutmut mutation testing on Python code and interpret surviving mutants.

23|2|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/eferro/augmentedcode-skills --skill mutation-testing-python
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mutation-testing-python
Source: https://github.com/eferro/augmentedcode-skills/tree/main/mutation-testing-python
Command: npx skills add https://github.com/eferro/augmentedcode-skills --skill mutation-testing-python

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mutation testing reveals whether your Python tests actually detect bugs introduced in production code, going beyond traditional coverage metrics.

Core Features & Use Cases

  • Guided mental mutation analysis for Python codebases.
  • Integration with mutmut and pytest for automated mutation testing workflows.
  • Techniques to strengthen tests on branches, validate TDD outcomes, and catch edge-case gaps.

Quick Start

Install mutmut, configure your project (pyproject.toml or setup.cfg), run mutation testing, and interpret surviving mutants to identify and fix weak tests.

Frequently Asked Questions about mutation-testing-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is mutation testing in Python and how does it verify test suite quality?

Mutation testing in Python verifies your test suite quality by intentionally mutating production code and evaluating if your tests detect the introduced bugs. It reveals whether your tests actually catch defects, going beyond traditional coverage metrics.

How do I set up mutmut and pytest for Python mutation testing?

To set up Python mutation testing, install mutmut and configure your project using pyproject.toml or setup.cfg. You then run mutation testing alongside pytest to automatically generate mutants and evaluate your test results.

Does mutation testing work for validating TDD outcomes and refactoring Python code?

Mutation testing works for validating TDD outcomes and ensuring refactors preserve behavior across changes in Python. It applies when analyzing code on feature branches to confirm your tests catch edge-case gaps and introduced bugs.

How do I interpret surviving mutants after running mutmut on my Python code?

Interpreting surviving mutants from mutmut involves identifying which code mutations your pytest suite failed to detect. You analyze these surviving mutants to locate and fix weak tests that lack proper assertions or edge-case coverage.

What is the best way to run mutation testing incrementally on a feature branch?

The best way to run mutation testing incrementally on a feature branch is to apply guided mental mutation analysis and configure mutmut to target only the changed code. This workflow limits scope and provides faster feedback on test quality.

Why does my code coverage look high but mutation testing still finds surviving mutants?

Mutation testing finds surviving mutants despite high code coverage because coverage only measures line execution, not assertion strength. Mutmut reveals tests that execute code but fail to assert correct behavior against introduced bugs.