test_repeated_calls_fold_into_one_loop_frame

Tests › tests/test_wiki_flow.py

passed Passed in the packaged run.

What this test is for

Why it exists

OWNER 2026-11-17 (round 5): repeated calls fold into a `loop ×N` frame. Five consecutive calls to the same function draw ONE arrow labelled ×5 inside a loop frame; the group still names every step it stands for (`data-steps`), so the step table, the step pop-ups and a replayed trace keep all five. The animation plays drawn arrows, so a fold leaves no gap.

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

Given

  1. —
→

When

  1. animated = flow_svg(_repeated(), animate=True)
  2. delays = [float(d) for d in re.findall(r"animation-delay:([\d.]+)s", animated)]
→

Then

  1. ✓ re.findall(r'data-step="(\d+)"', animated) equals ["0", "5"]
  2. ✓ animated contains 'data-steps="0 1 2 3 4"'
  3. ✓ animated contains ">loop ×5<"
  4. ✓ animated contains ">cap ×5<"
  5. ✓ delays equals [0.0, STEP_SECONDS]
  6. ✓ animated contains ">6<"

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:239 · its file's page

What it checks (5)

  1. assert re.findall(r'data-step="(\d+)"', animated) == ["0", "5"] observes flow_svg via animated
  2. assert 'data-steps="0 1 2 3 4"' in animated observes flow_svg via animated
  3. assert ">loop ×5<" in animated and ">cap ×5<" in animated observes flow_svg via animated
  4. assert delays == [0.0, STEP_SECONDS] not attributed
  5. assert ">6<" in animated observes flow_svg via animated

Where the product reaches it

  • build_wiki → _build_site → flow_page → _block → flow_svg (flow)

Call flow

test_repeated_calls_fold_into_one_loop_frame→flow_svg→_repeated

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)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-001catalogunknown
REQ-DDB-WIKI-008catalogunknown
REQ-DDB-WIKI-047catalogunknown