test_a_test_s_slices_are_playable

Tests › tests/test_wiki_testslices.py

passed Passed in the packaged run.

What this test is for

Why it exists

W-6 (owner review 2026-11-22): "tests are not playable". The exercises section carries the player's controls and loads `clew-views.js`, whose slice player steps through the steps the test RAN (`g.st.ex`), in order, paced to reading speed like the flow player.

Given

  1. monkeypatch.setattr(slices, "slice_svg", lambda flow, cut: "<svg class='seq'/>")
  2. page = SimpleNamespace(name="flow-a", title="a", steps=4, flow=None)
2 more
  1. html = testpages._exercises("t", {"slices": {"t": [(page, SimpleNamespace(exercised=(1, 2)))]}})
  2. views = (Path(clew.wiki.__file__).parent / "themes/clew/static/clew-views.js").read_text()
→

When

  1. —
→

Then

  1. ✓ html contains 'data-slice-control="play"'
  2. ✓ html contains 'data-slice-control="step"'
  3. ✓ html contains "data-flow-speed"
  4. ✓ html contains "_static/clew-views.js"
  5. ✓ views contains "WPM = 238"
  6. ✓ views contains "g.st.ex"

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 · 5 of 400 steps

… 332 earlier steps

callercallercallercallerother filesother filesother filesother filesloop (line 102)loopbuild_wiki333–334. test_pages → _replay333_replay +1 more335. _exercises → _slice_groups335_slice_groups▶ test enters336. _slice_groups → test_name336test_name337–339. _exercises → _player_controls337_player_controls +2 more340–341. slice_svg → _windows340_windows +1 more

… 59 later steps

tests/test_wiki_testslices.py:206 · its file's page

What it checks (3)

  1. assert 'data-slice-control="play"' in html and 'data-slice-control="step"' in html observes _exercises via html
  2. assert "data-flow-speed" in html and "_static/clew-views.js" in html observes _exercises via html
  3. assert "WPM = 238" in views and "g.st.ex" in views not attributed

Where the product reaches it

  • build_wiki → _build_site → test_pages → _exercises (flow)

Call flow

test_a_test_s_slices_are_playable→_exercises

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_a_test_s_slices_are_playable · 3 checks_exercisesREQ-DDB-WIKI-041 · measured
Also reaches 1 requirement

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