test_the_reports_say_which_dependency_covered_it¶
Tests › tests/guard/test_guard_dependency_coverage.py
What this test is for
Why it exists
Text and Markdown list each "via"; neither mentions it when the option is off.
Given
base = { "covered": [], "total_requirements": 2, "uncovered": ["REQ-B"], "exempt": [], "orphan_refs": [], "unmapped_functions": [], "traceability": None, }via = {**base, "covered_via": [{"req_id": "REQ-A", "via": "lib:REQ-L-1", "how": "implemented"}]}
When
format_coverage_text(via)format_coverage_markdown(via)format_coverage_text(base)format_coverage_markdown(base)
Then
- ✓ format_coverage_text(via) contains "REQ-A via lib:REQ-L-1 (implemented)"
- ✓ format_coverage_markdown(via) contains "- REQ-A via lib:REQ-L-1 (implemented)"
- ✓ format_coverage_text(base) does not contain "via"
- ✓ format_coverage_markdown(base) does not contain "via"
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
`main` (clew/guard/main.py) · 2 of 357 steps
… 327 earlier steps
… 24 later steps
tests/guard/test_guard_dependency_coverage.py:88 · its file's page
What it checks (3)
assert "REQ-A via lib:REQ-L-1 (implemented)" in format_coverage_text(via)observesformat_coverage_textassert "- REQ-A via lib:REQ-L-1 (implemented)" in format_coverage_markdown(via)observesformat_coverage_markdownassert "via" not in format_coverage_text(base) and "via" not in format_coverage_markdown(base)observesformat_coverage_text
Where the product reaches it
main→_run→run_precommit→_coverage_gate→format_coverage_text(flow)
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-GUARD-022 measured