test_the_requirements_page_summarises_each_requirement_group¶
Tests › tests/test_wiki_site.py
What this test is for
Why it exists
ONE PAGE FOR THE TRACE (owner 2026-11-15: requirements and summary filled the same role): the group counts sit above the per-requirement table. A requirement tested in fewer layers than `min_layers` is counted, so one-layer coverage is visible rather than reading as tested.
Verifies REQ-DDB-WIKI-011 REQ-DDB-WIKI-012 REQ-DDB-WIKI-013 REQ-DDB-WIKI-014 REQ-DDB-WIKI-015 REQ-DDB-WIKI-018 REQ-DDB-WIKI-020 REQ-DDB-WIKI-021 REQ-DDB-WIKI-022 REQ-DDB-WIKI-023 REQ-DDB-WIKI-025 REQ-DDB-WIKI-031 REQ-DDB-WIKI-044 REQ-DDB-WIKI-050 REQ-DDB-WIKI-052
Given
page = site["requirements.html"]def cells(group: str) -> list[str]: row = page.split(f"<td>{group}</td>", 1)[1].split("</tr>")[0] return re.findall(r"<td[^>]*>([^<]*)</td>", row)
When
- —
Then
- ✓ site does not contain "summary.html"
- ✓ cells("REQ-W")[:10] equals ["2", "2", "2", "1", "1", "0", "0", "0", "0", "1"]
- ✓ cells("REQ-X")[:10] equals ["1", "1", "1", "1", "0", "0", "0", "0", "0", "1"]
- ✓ page contains "only by call-graph inference"
- ✓ page.index('data-req-filter="REQ-W"') is less than page.index("REQ-W-001")
tests/test_wiki_site.py:302 · its file's page
What it checks (5)
assert "summary.html" not in sitenot attributedassert cells("REQ-W")[:10] == ["2", "2", "2", "1", "1", "0", "0", "0", "0", "1"]not attributedassert cells("REQ-X")[:10] == ["1", "1", "1", "1", "0", "0", "0", "0", "0", "1"]not attributedassert "only by call-graph inference" in pagenot attributedassert page.index('data-req-filter="REQ-W"') < page.index("REQ-W-001")not attributed
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.
Requirements it verifies (15)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-011 | catalog | unknown |
| REQ-DDB-WIKI-012 | catalog | unknown |
| REQ-DDB-WIKI-013 | catalog | unknown |
| REQ-DDB-WIKI-014 | catalog | unknown |
| REQ-DDB-WIKI-015 | catalog | unknown |
| REQ-DDB-WIKI-018 | catalog | unknown |
| REQ-DDB-WIKI-020 | catalog | unknown |
| REQ-DDB-WIKI-021 | catalog | unknown |
| REQ-DDB-WIKI-022 | catalog | unknown |
| REQ-DDB-WIKI-023 | catalog | unknown |
| REQ-DDB-WIKI-025 | catalog | unknown |
| REQ-DDB-WIKI-031 | catalog | unknown |
| REQ-DDB-WIKI-044 | catalog | unknown |
| REQ-DDB-WIKI-050 | catalog | unknown |
| REQ-DDB-WIKI-052 | catalog | unknown |