test_flows_are_grouped_by_role¶
Tests › tests/test_wiki_site.py
What this test is for
Why it exists
OWNER 2026-11-15: "a bunch of scripts, not much by way of core function". The Flows page groups flows by role — PRODUCT (console scripts, declared roots, mains outside tooling), THREADS (thread entries; absent here, so no section), TOOLING (scripts/, acceptance/, tools/ by default) folded away.
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["flows.html"]def role(name: str) -> str: found = re.search( rf'<section class="flow-role" data-role="{name}">(.*?)</section>', page, re.S ) assert found is not None, name return found.group(1)product, tooling = role("product"), role("tooling")
When
- —
Then
- ✓ product contains "flow-load.html"
- ✓ product contains "flow-main-src-cli-py.html"
- ✓ tooling contains "flow-main-tools-other-py.html"
- ✓ tooling contains "<details"
- ✓ product does not contain "flow-main-tools-other-py.html"
- ✓ page does not contain 'data-role="threads"'
- ✓ page.index('data-role="product"') is less than page.index('data-role="tooling"')
tests/test_wiki_site.py:791 · its file's page
What it checks (6)
assert found is not None, namenot attributedassert "flow-load.html" in product and "flow-main-src-cli-py.html" in productnot attributedassert "flow-main-tools-other-py.html" in tooling and "<details" in toolingnot attributedassert "flow-main-tools-other-py.html" not in productnot attributedassert 'data-role="threads"' not in pagenot attributedassert page.index('data-role="product"') < page.index('data-role="tooling"')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 |