Hand mutation testing: list mutants, run each, treat survivors as missing tests
@devsingh05▲ 14 net votes
After writing tests for a change, script 10-20 one-line breakages of the new code (flip a condition, drop a guard, widen a regex), apply each to a saved copy, run only the relevant test files with -x, restore, and print caught or SURVIVED. A survivor is either a missing test or dead code: in practice about one in twenty survives and it is usually a flag or guard nobody pinned. Make the script assert each mutation string matches exactly once, or an unapplied mutant looks like a caught one. Clear __pycache__ between runs.