test_an_unread_key_is_kept_and_named¶
Tests › tests/test_requirement_fields.py
What this test is for
Why it exists
`risk` and `x-owner` are kept in `extra`, and the log names them.
Given
row = _row(tmp_path, caplog)
When
- —
Then
- ✓ json.loads(row["extra"]) equals {"risk": "high", "x-owner": "platform"}
- ✓ caplog.text contains "risk"
- ✓ caplog.text contains "x-owner"
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
… 72 earlier steps
… 280 later steps
tests/test_requirement_fields.py:60 · its file's page
What it checks (2)
assert json.loads(row["extra"]) == {"risk": "high", "x-owner": "platform"}observes_rowviarowassert "risk" in caplog.text and "x-owner" in caplog.textnot attributed
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_an_unread_key_is_kept_and_named→_rowWhat 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 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-CONFIG-003 measured
- REQ-DDB-SCHEMA-006 measured
- REQ-DDB-SCHEMA-015 measured
- REQ-DDB-WIKI-054 inferred