test_the_flow_verb_prints_svg

Tests › tests/test_wiki_flow.py

passed Passed in the packaged run.

What this test is for

Why it exists

`clew wiki flow ENTRY --svg --animate` prints the animated diagram itself.

Verifies REQ-DDB-WIKI-008 REQ-DDB-WIKI-047

Given

  1. monkeypatch.setattr(command, "_flow_object", lambda args, db, repo: _three_steps())
  2. db = tmp_path / "clew.db"
  3. db.write_bytes(b"")
→

When

  1. command.wiki_main(["flow", "a", "--index", str(db), "--svg", "--animate"])
  2. out = capsys.readouterr().out
→

Then

  1. ✓ command.wiki_main(["flow", "a", "--index", str(db), "--svg", "--animate"]) equals 0
  2. ✓ out.startswith("<svg") holds
  3. ✓ out contains "animation-delay"

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

Build this wiki from the index · 3 of 400 steps

… 217 earlier steps

callercallercallercallerclew/wiki/flowpage.pyclew/wiki/flowpage.pyclew/wiki/flowpage.pyclew/wiki/flowpage.pyother filesother filesother filesother filesbuild_wiki218. _block → _controls218_controls219. _block → flow_svg219flow_svg220. flow_svg → _fold_inside220_fold_inside▶ test enters221–222. flow_svg → _runs221_runs +1 more223–224. flow_page → test_node223test_node +1 more

… 176 later steps

tests/test_wiki_flow.py:198 · its file's page

What it checks (2)

  1. assert command.wiki_main(["flow", "a", "--index", str(db), "--svg", "--animate"]) == 0 observes wiki_main
  2. assert out.startswith("<svg") and "animation-delay" in out 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_the_flow_verb_prints_svg→_three_steps→wiki_main

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.

test_the_flow_verb_prints_svg · 2 checkswiki_main… 3 calls …report_statsREQ-DDB-CLI-001 · inferredwiki_main… 8 calls …doxygen_supports_sqlite3REQ-DDB-CLI-002 · inferredwiki_main… 4 calls …stated_document_metaREQ-DDB-CONFIG-001 · inferredwiki_main… 5 calls …_is_flat_req_listREQ-DDB-CONFIG-003 · inferredwiki_main… 4 calls …resolve_preprocessorREQ-DDB-CONFIG-004 · inferredwiki_main… 4 calls …import_kconfigREQ-DDB-CONFIG-005 · inferredwiki_main… 4 calls …recorded_explicitREQ-DDB-CONFIG-006 · inferredwiki_main… 4 calls …write_build_signatureREQ-DDB-CONFIG-007 · inferredwiki_main… 4 calls …load_toolchain_configREQ-DDB-CONFIG-009 · inferredwiki_main… 3 calls …read_requirements_sectionREQ-DDB-GUARD-012 · inferredwiki_main… 6 calls …parse_doxygen_tagsREQ-DDB-GUARD-019 · inferredwiki_main… 6 calls …apply_autobriefREQ-DDB-GUARD-024 · inferred

and 90 more requirement paths, listed below.

Requirements it verifies (2)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-008catalogunknown
REQ-DDB-WIKI-047catalog1 of 1: _actor_of
Also reaches 101 requirements

Its run touches their code; that is reach, not proof.