test_the_reports_say_which_dependency_covered_it

Tests › tests/guard/test_guard_dependency_coverage.py

passed Passed in the packaged run.

What this test is for

Why it exists

Text and Markdown list each "via"; neither mentions it when the option is off.

Given

  1. base = { "covered": [], "total_requirements": 2, "uncovered": ["REQ-B"], "exempt": [], "orphan_refs": [], "unmapped_functions": [], "traceability": None, }
  2. via = {**base, "covered_via": [{"req_id": "REQ-A", "via": "lib:REQ-L-1", "how": "implemented"}]}
→

When

  1. format_coverage_text(via)
  2. format_coverage_markdown(via)
  3. format_coverage_text(base)
  4. format_coverage_markdown(base)
→

Then

  1. ✓ format_coverage_text(via) contains "REQ-A via lib:REQ-L-1 (implemented)"
  2. ✓ format_coverage_markdown(via) contains "- REQ-A via lib:REQ-L-1 (implemented)"
  3. ✓ format_coverage_text(base) does not contain "via"
  4. ✓ 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

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyopt (line 250)optmain328. _coverage_gate → format_coverage_text328format_coverage_text329. format_coverage_text → traceability_line329traceability_line330. format_coverage_text → _why330_why▶ test enters331. format_coverage_text → _via331_via332. _coverage_gate → traceability_line332traceability_line333. _run → build_parser333build_parser

… 24 later steps

tests/guard/test_guard_dependency_coverage.py:88 · its file's page

What it checks (3)

  1. assert "REQ-A via lib:REQ-L-1 (implemented)" in format_coverage_text(via) observes format_coverage_text
  2. assert "- REQ-A via lib:REQ-L-1 (implemented)" in format_coverage_markdown(via) observes format_coverage_markdown
  3. assert "via" not in format_coverage_text(base) and "via" not in format_coverage_markdown(base) observes format_coverage_text

Where the product reaches it

  • main → _run → run_precommit → _coverage_gate → format_coverage_text (flow)

Call flow

test_the_reports_say_which_dependency_covered_it→format_coverage_text→format_coverage_markdown

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.

test_the_reports_say_which_dependency_covered_it · 3 checksformat_coverage_textREQ-DDB-GUARD-022 · measured
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.