alunduil / alunduil/zfs-replicate

Tests kill the remaining mutants across the smaller modules

Open
#673 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
24
Forks
6
Avg merge
3h 11m
Merged PRs (30d)
49

Description

## User story

As a **maintainer of zfs-replicate's test suite**, I want **the tail of the mutation baseline worked through**, so that **every survivor in the tree is either killed or carries a reason, and the nightly score means something**.

## Why

The four largest concentrations from #485 have their own issues (#668, #669, #670, #671), and the untested filesystem modules have #672. That leaves 113 survivors spread thinly:

| Module | Survivors |
| --- | --- |
| `filesystem/destroy.py` | 20 |
| `process.py` | 18 |
| `cli/click.py` | 18 |
| `snapshot/destroy.py` | 16 |
| `snapshot/send.py` | 10 |
| `cli/log.py` | 5 |
| `cli/options.py` | 5 |
| `task/generate.py` | 5 |
| `optional.py` | 4 |
| `stderr.py` | 4 |
| `compress/command.py` | 4 |
| `command.py` | 2 |
| `filesystem/type.py` | 2 |

Split them across pull requests however they group; one module per pull request keeps each reviewable. Expect a meaningful share to be equivalent mutants rather than gaps: replacing an argument with `None` is a common mutation and `mypy --strict` would reject most of those edits before they ever ran.

## Acceptance criteria

- [ ] Every survivor in the modules above is either killed by a test or recorded as an equivalent mutant with a one-line reason.
- [ ] Reasons live where the next reader will meet them, as a comment at the code in question rather than a list in an issue.
- [ ] `poetry run mutmut run --max-children 1` reports no survivor outside the modules tracked by the other follow-ups.

## Out of scope

- A mutation-score threshold on pull requests, and diff-scoped per-pull-request runs. Both wait for the baseline to settle, per #485.
- Chasing a 100% kill rate; equivalent mutants make it neither reachable nor worth the tests it would take.

## Notes

- Reproduce with `poetry install --with mutation` then `poetry run mutmut run --max-children 1`, and read one survivor with `poetry run mutmut show `. Serial matters: the parallel runner mis-attributes verdicts on this suite.
- The five `cli/options.py` survivors are in `_parse_properties`. The two Click option groups above it carry a no-mutate pragma because they run at import, before mutmut can switch a mutant in.
- Follow-up to #485.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.