test_flows_are_grouped_by_role

Tests › tests/test_wiki_site.py

passed Passed in the packaged run.

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

  1. page = site["flows.html"]
  2. 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)
  3. product, tooling = role("product"), role("tooling")
→

When

  1. —
→

Then

  1. ✓ product contains "flow-load.html"
  2. ✓ product contains "flow-main-src-cli-py.html"
  3. ✓ tooling contains "flow-main-tools-other-py.html"
  4. ✓ tooling contains "<details"
  5. ✓ product does not contain "flow-main-tools-other-py.html"
  6. ✓ page does not contain 'data-role="threads"'
  7. ✓ 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)

  1. assert found is not None, name not attributed
  2. assert "flow-load.html" in product and "flow-main-src-cli-py.html" in product not attributed
  3. assert "flow-main-tools-other-py.html" in tooling and "<details" in tooling not attributed
  4. assert "flow-main-tools-other-py.html" not in product not attributed
  5. assert 'data-role="threads"' not in page not attributed
  6. assert 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)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-011catalogunknown
REQ-DDB-WIKI-012catalogunknown
REQ-DDB-WIKI-013catalogunknown
REQ-DDB-WIKI-014catalogunknown
REQ-DDB-WIKI-015catalogunknown
REQ-DDB-WIKI-018catalogunknown
REQ-DDB-WIKI-020catalogunknown
REQ-DDB-WIKI-021catalogunknown
REQ-DDB-WIKI-022catalogunknown
REQ-DDB-WIKI-023catalogunknown
REQ-DDB-WIKI-025catalogunknown
REQ-DDB-WIKI-031catalogunknown
REQ-DDB-WIKI-044catalogunknown
REQ-DDB-WIKI-050catalogunknown
REQ-DDB-WIKI-052catalogunknown