test_a_requirement_owned_elsewhere_is_exempt_by_its_field¶
Tests › tests/test_wiki_exempt.py
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
guard = { "requirements": {**_GUARD["requirements"], "exempt_when": {"responsibility": ["Cloud"]}} }evidence = [_row("R-CLOUD", "MISSING"), _row("R-OURS", "MISSING")]declared = { "R-CLOUD": {"x-status": "active", "responsibility": "Cloud"}, "R-OURS": {"x-status": "active", "responsibility": "Library"}, }
When
tiers = {r.req_id: r.tier for r in exempt_by_status(evidence, declared, guard)}
Then
- ✓ 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
… 40 later steps
tests/test_wiki_exempt.py:69 · its file's page
What it checks (1)
assert tiers == {"R-CLOUD": "EXEMPT", "R-OURS": "MISSING"}observesexempt_by_statusviatiers
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
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 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-GUARD-022 measured
- REQ-DDB-WIKI-002 measured