test_flows_export_as_graphviz_dot

Tests › tests/test_wiki_exports.py

passed Passed in the packaged run.

What this test is for

Why it exists

S7 (owner-approved 2026-11-17): Graphviz DOT beside Mermaid and PlantUML. DOT is a GRAPH format, so a flow is drawn as one: each lane a cluster, each function a node in its lane, each step an edge numbered in call order — the sequence survives as the numbers.

Verifies REQ-DDB-WIKI-029

Given

  1. html = _html(site)
  2. dot = (html / "exports/flows/flow-load.dot").read_text()
→

When

  1. —
→

Then

  1. ✓ dot.startswith("digraph ") holds
  2. ✓ dot.rstrip().endswith("}") holds
  3. ✓ dot.count("subgraph cluster_") equals 2
  4. ✓ dot contains 'label="src/data.py"'
  5. ✓ dot contains '"load@src/data.py" -> "parse@src/data.py" [label="1"'
  6. ✓ site["flow-load.html"] contains 'href="exports/flows/flow-load.dot"'

tests/test_wiki_exports.py:98 · its file's page

What it checks (4)

  1. assert dot.startswith("digraph ") and dot.rstrip().endswith("}") not attributed
  2. assert dot.count("subgraph cluster_") == 2 and 'label="src/data.py"' in dot not attributed
  3. assert '"load@src/data.py" -> "parse@src/data.py" [label="1"' in dot not attributed
  4. assert 'href="exports/flows/flow-load.dot"' in site["flow-load.html"] not 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_flows_export_as_graphviz_dot→_html

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 (1)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-029catalogunknown