test_the_overlay_gives_each_confirmed_step_its_values¶
Tests › tests/test_wiki_tracerun.py
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
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"), ] } ] } ] }expected = [("test_load", "load"), ("load", "parse"), ("load", "parse"), ("load", "finish")]
When
values = overlay(expected, otlp)["values"]
Then
- ✓ values[1] equals {"args": "raw=1", "return": "2"}
- ✓ values[2] equals { "args": "raw=2", "return": "4", }
- ✓ values[0] equals {"args": "items=[1, 2]", "return": "[2, 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
… 194 later steps
tests/test_wiki_tracerun.py:444 · its file's page
What it checks (2)
assert values[1] == {"args": "raw=1", "return": "2"} and values[2] == { "args": "raw=2", "return": "4", }observesoverlayviavaluesassert values[0] == {"args": "items=[1, 2]", "return": "[2, 4]"} and values[3] is Noneobservesoverlayviavalues
Where the product reaches it
build_wiki→_build_site→flow_page→with_values→overlay(flow)
Call flow
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)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-036 | catalog | unknown |
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-035 measured
- REQ-DDB-WIKI-049 measured