test_a_requirement_owned_elsewhere_is_exempt_by_its_field

Tests › tests/test_wiki_exempt.py

passed Passed in the packaged run.

What this test is for

Why it exists

2.1 (#72 item 14): `exempt_when` reaches the wiki through the gate's own predicate, so the two still agree.

Given

  1. guard = { "requirements": {**_GUARD["requirements"], "exempt_when": {"responsibility": ["Cloud"]}} }
  2. evidence = [_row("R-CLOUD", "MISSING"), _row("R-OURS", "MISSING")]
  3. declared = { "R-CLOUD": {"x-status": "active", "responsibility": "Cloud"}, "R-OURS": {"x-status": "active", "responsibility": "Library"}, }
→

When

  1. tiers = {r.req_id: r.tier for r in exempt_by_status(evidence, declared, guard)}
→

Then

  1. ✓ tiers equals {"R-CLOUD": "EXEMPT", "R-OURS": "MISSING"}

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) · 1 of 357 steps

… 312 earlier steps

program launcherprogram launcherprogram launcherprogram launcherclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyother filesother filesother filesother filesloop (line 208)looploop (line 150)loopmain313. _exempt → get_requirements313get_requirements314. _exempt → exemption314exemption315. exemption → list315list▶ test enters316. analyze_coverage → traceability316traceability317. traceability → is_test_path317is_test_path

… 40 later steps

tests/test_wiki_exempt.py:69 · its file's page

What it checks (1)

  1. assert tiers == {"R-CLOUD": "EXEMPT", "R-OURS": "MISSING"} observes exempt_by_status via tiers

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_a_requirement_owned_elsewhere_is_exempt_by_its_field→_row→exempt_by_status

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_a_requirement_owned_elsewhere_is_exempt_by_its_field · 1 checksexempt_by_statusexemptionREQ-DDB-GUARD-022 · measuredexempt_by_statusREQ-DDB-WIKI-002 · measured
Also reaches 2 requirements

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