Expand description
Coverage rule (Python — issue #26).
Enforces the README’s Coverage rule: a library’s unit suite must meet the
configured floor, measured with branch coverage, with test files excluded
from the denominator. This module is the deterministic core — given a
coverage.py JSON report (CoverageReport) and the Thresholds from
config, evaluate decides pass/fail. Producing the report (shelling out
to coverage) is a thin layer on top, kept separate so the guarantee is
testable without a Python toolchain.
Structs§
- Coverage
Report - A coverage.py JSON report (
coverage json), pared to the totals the check needs. Unmodeled fields (per-file data, metadata) are ignored. - Thresholds
- The coverage floor to enforce, from a
[<language>].coveragetable. - Totals
- The
totalsblock of a coverage.py report.
Enums§
- Outcome
- The result of checking a report against the thresholds.
Functions§
- evaluate
- Decide whether
reportmeetsthresholds. - measure
- Run the unit suite under coverage.py in
rootand check it againstthresholds. - parse_
report - Parse a coverage.py JSON report (the output of
coverage json).