Skip to main content

measure_python

Function measure_python 

Source
pub fn measure_python(
    root: &Path,
    exempt: &[String],
    base: Option<&str>,
) -> Result<Vec<Survivor>>
Expand description

Run cosmic-ray over the Python project at root and return its un-exempted survivors — the Python arm of the mutation rule (#203), parity with measure_rust and measure_typescript.

With base set, only mutants on the <base>...HEAD changed lines are reported: cosmic-ray has no native git-diff mode, so the run is scoped to the changed .py files (one session each) and the survivors are then filtered to the changed lines — line granularity, matching the other arms. Without it, the whole project’s sources run (tests excluded). exempt is the resolved mutation-rule exempt paths. cosmic-ray + pytest must be installed.