test_the_overlay_gives_each_confirmed_step_its_values

Tests › tests/test_wiki_tracerun.py

passed Passed in the packaged run.

What this test is for

Why it exists

OWNER (round 5, P5.6): replay WITH VALUES. Each predicted step the run confirmed carries what it was called with and returned. A pair called twice pairs IN ORDER — the second predicted `load → parse` is the second observed one; a step the run never made has none.

Verifies REQ-DDB-WIKI-036

Given

  1. otlp = { "resourceSpans": [ { "scopeSpans": [ { "spans": [ _valued("t", "", "test_load", "", "None"), _valued("a", "t", "load", "items=[1, 2]", "[2, 4]"), _valued("b", "a", "parse", "raw=1", "2"), _valued("c", "a", "parse", "raw=2", "4"), ] } ] } ] }
  2. expected = [("test_load", "load"), ("load", "parse"), ("load", "parse"), ("load", "finish")]
→

When

  1. values = overlay(expected, otlp)["values"]
→

Then

  1. ✓ values[1] equals {"args": "raw=1", "return": "2"}
  2. ✓ values[2] equals { "args": "raw=2", "return": "4", }
  3. ✓ values[0] equals {"args": "items=[1, 2]", "return": "[2, 4]"}
  4. ✓ values[3] is None

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

… 200 earlier steps

callercallercallercallerclew/wiki/flowpage.pyclew/wiki/flowpage.pyclew/wiki/flowpage.pyclew/wiki/flowpage.pyother filesother filesother filesother filesopt (line 275)optbuild_wiki201. flow_page → with_values201with_values202. with_values → overlay202overlay203. overlay → spans_of203spans_of▶ test enters204. overlay → _step_values204_step_values205–206. flow_page → _segments205_segments +1 more

… 194 later steps

tests/test_wiki_tracerun.py:444 · its file's page

What it checks (2)

  1. assert values[1] == {"args": "raw=1", "return": "2"} and values[2] == { "args": "raw=2", "return": "4", } observes overlay via values
  2. assert values[0] == {"args": "items=[1, 2]", "return": "[2, 4]"} and values[3] is None observes overlay via values

Where the product reaches it

  • build_wiki → _build_site → flow_page → with_values → overlay (flow)

Call flow

test_the_overlay_gives_each_confirmed_step_its_values→_valued→overlay

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_overlay_gives_each_confirmed_step_its_values · 2 checksoverlayREQ-DDB-WIKI-035 · measuredoverlay_step_valuesREQ-DDB-WIKI-049 · measured

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-036catalogunknown
Also reaches 2 requirements

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