tests.test_coverage_floor moduleΒΆ

Tests for lint-coverage: the coverage floor against the coverage total.

tests.test_coverage_floor.project(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) → Path[source]ΒΆ

An empty project directory, as the working directory.

Return type:

Path

tests.test_coverage_floor.test_floor_lags_past_the_slack(project, headroom, lags)[source]ΒΆ

A floor further under the total than the slack fails the check.

Return type:

None

tests.test_coverage_floor.test_lagging_floor_warns_without_fatal(project, args, exit_code, annotation)[source]ΒΆ

--no-fatal turns the failure into a warning, with the same message.

Return type:

None

tests.test_coverage_floor.test_nothing_to_compare_passes(project, floor, total, message)[source]ΒΆ

With no report or no floor, the check passes and says why.

Return type:

None

tests.test_coverage_floor.test_unreadable_report_fails_cleanly(project)[source]ΒΆ

A report with no total ends on an error message, not a traceback.

Return type:

None