test_each_requirement_gets_its_tier

Tests › tests/test_wiki_evidence.py

passed Passed in the packaged run.

What this test is for

Why it exists

PASS, GAP, TARGET, NOT_RUN and MISSING, each from its own evidence.

Given

  1. junit = tmp_path / "junit.xml"
  2. junit.write_text(_JUNIT)
2 more
  1. cov = tmp_path / "coverage.xml"
  2. cov.write_text(_COBERTURA)
→

When

  1. rows = { r.req_id: r for r in requirement_evidence( traced, junit=[junit], coverage=cov, target_only=("test_flash",) ) }
→

Then

  1. ✓ {k: v.tier for k, v in rows.items()} equals { "R-PASS": "PASS", "R-GAP": "GAP", "R-TARGET": "TARGET", "R-NOTRUN": "NOT_RUN", "R-MISSING": "MISSING", }
  2. ✓ rows["R-PASS"].implementers_covered equals ("impl",)
  3. ✓ rows["R-MISSING"].implementers_uncovered equals ("dead",)

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.

Build this wiki from the index · 7 of 400 steps

… 344 earlier steps

callercallercallercallerclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyother filesother filesother filesother filesbuild_wiki345. slice_svg → _hidden345_hidden346. _build_site → parse_junit346parse_junit347. parse_junit → fold_cases347fold_cases▶ test enters348. fold_cases → _folded348_folded349–353. parse_junit → _case_name349_case_name +4 more354. _build_site → _lines_by_test354_lines_by_test355. _lines_by_test → lines_per_test355lines_per_test

… 45 later steps

tests/test_wiki_evidence.py:112 · its file's page

What it checks (3)

  1. assert {k: v.tier for k, v in rows.items()} == { "R-PASS": "PASS", "R-GAP": "GAP", "R-TARGET": "TARGET", "R-NOTRUN": "NOT_RUN", "R-MISSING": "MISSING", } observes requirement_evidence via rows
  2. assert rows["R-PASS"].implementers_covered == ("impl",) observes requirement_evidence via rows
  3. assert rows["R-MISSING"].implementers_uncovered == ("dead",) observes requirement_evidence via rows

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_each_requirement_gets_its_tier→requirement_evidence

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_each_requirement_gets_its_tier · 3 checksrequirement_evidenceconnectREQ-DDB-QUERY-001 · measuredrequirement_evidence_implementer_spanstable_existsREQ-DDB-QUERY-003 · measuredrequirement_evidenceREQ-DDB-WIKI-002 · measuredrequirement_evidence_tierallREQ-DDB-WIKI-054 · inferred
Also reaches 7 requirements

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