test_a_test_section_says_what_it_verifies_and_how¶
Tests › tests/test_wiki_symbols.py
What this test is for
Why it exists
OWNER 2026-11-15: "click into a test associated with a requirement and see WHAT it's testing". A test's section lists its assertions, the requirements it verifies with the link kind, and for an inferred link the call path from the test to the implementer it reaches.
Given
page = site["sym-tests-test-data-py.html"]sec = page[page.index('id="s-test_load"') :]
3 more
asserts = sec[sec.index('class="asserts"') :]verifies = sec[sec.index('class="verifies"') :]verifies = verifies[: verifies.index("</table>")]
When
- —
Then
- ✓ asserts[: asserts.index("</ul>")] contains "assert load([]) == 1"
- ✓ verifies contains 'href="requirements.html#REQ-X-001"'
- ✓ verifies contains "via-inferred"
- ✓ re.search(r"test_load\s*→\s*load\s*→\s*parse", re.sub(r"<[^>]+>", "", verifies)) holds
- ✓ sec[: sec.index('class="verifies"')] contains "t-passed"
tests/test_wiki_symbols.py:131 · its file's page
What it checks (4)
assert "assert load([]) == 1" in asserts[: asserts.index("</ul>")]not attributedassert 'href="requirements.html#REQ-X-001"' in verifies and "via-inferred" in verifiesnot attributedassert re.search(r"test_load\s*→\s*load\s*→\s*parse", re.sub(r"<[^>]+>", "", verifies))not attributedassert "t-passed" in sec[: sec.index('class="verifies"')]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 (3)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-025 | catalog | unknown |
| REQ-DDB-WIKI-026 | catalog | unknown |
| REQ-DDB-WIKI-027 | catalog | unknown |