test_a_steps_dialog_carries_its_recorded_values¶
Tests › tests/test_wiki_tracerun.py
What this test is for
Why it exists
P5.6: the step data gains `called_with` / `returned` from the run, unless withheld.
Verifies REQ-DDB-WIKI-036
Given
data = [{"caller": "test_load", "callee": "load"}, {"caller": "load", "callee": "parse"}]otlp = { "resourceSpans": [ { "scopeSpans": [ { "spans": [ _valued("t", "", "test_load", "", "None"), _valued("a", "t", "load", "items=[1]", "[2]"), ] } ] } ] }
When
out = with_values(data, otlp, Audience())hidden = with_values(data, otlp, Audience(exclude_bodies=True))all("called_with" not in r for r in hidden)
Then
- ✓ out[0]["called_with"] equals "items=[1]"
- ✓ out[0]["returned"] equals "[2]"
- ✓ out[1] does not contain "called_with"
- ✓ all("called_with" not in r for r in hidden) holds
- ✓ _SCRIPT contains "s.called_with"
- ✓ _SCRIPT contains "s.returned"
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
… 199 earlier steps
… 194 later steps
tests/test_wiki_tracerun.py:478 · its file's page
What it checks (4)
assert out[0]["called_with"] == "items=[1]" and out[0]["returned"] == "[2]"observeswith_valuesviaoutassert "called_with" not in out[1], "a step the run never made carries no values"observeswith_valuesviaoutassert all("called_with" not in r for r in hidden), "values are withheld with the bodies"observesallassert "s.called_with" in _SCRIPT and "s.returned" in _SCRIPTnot attributed
Where the product reaches it
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 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-035 measured
- REQ-DDB-WIKI-049 measured
- REQ-DDB-WIKI-054 inferred