test_a_steps_dialog_carries_its_recorded_values

Tests › tests/test_wiki_tracerun.py

passed Passed in the packaged run.

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

  1. data = [{"caller": "test_load", "callee": "load"}, {"caller": "load", "callee": "parse"}]
  2. otlp = { "resourceSpans": [ { "scopeSpans": [ { "spans": [ _valued("t", "", "test_load", "", "None"), _valued("a", "t", "load", "items=[1]", "[2]"), ] } ] } ] }
→

When

  1. out = with_values(data, otlp, Audience())
  2. hidden = with_values(data, otlp, Audience(exclude_bodies=True))
  3. all("called_with" not in r for r in hidden)
→

Then

  1. ✓ out[0]["called_with"] equals "items=[1]"
  2. ✓ out[0]["returned"] equals "[2]"
  3. ✓ out[1] does not contain "called_with"
  4. ✓ all("called_with" not in r for r in hidden) holds
  5. ✓ _SCRIPT contains "s.called_with"
  6. ✓ _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

callercallercallercallerclew/wiki/flowpage.pyclew/wiki/flowpage.pyclew/wiki/flowpage.pyclew/wiki/flowpage.pyother filesother filesother filesother filesloop (line 441)loopopt (line 275)optbuild_wiki200. step_data → _call_text200_call_text201. flow_page → with_values201with_values202. with_values → overlay202overlay▶ test enters203–204. overlay → spans_of203spans_of +1 more205–206. flow_page → _segments205_segments +1 more

… 194 later steps

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

What it checks (4)

  1. assert out[0]["called_with"] == "items=[1]" and out[0]["returned"] == "[2]" observes with_values via out
  2. assert "called_with" not in out[1], "a step the run never made carries no values" observes with_values via out
  3. assert all("called_with" not in r for r in hidden), "values are withheld with the bodies" observes all
  4. assert "s.called_with" in _SCRIPT and "s.returned" in _SCRIPT not attributed

Where the product reaches it

  • dossier → _rank_enum_over_mirror → _class_side_is_only_enum_mirrors → all (flow)
  • build_wiki → _build_site → flow_page → with_values (flow)

Call flow

test_a_steps_dialog_carries_its_recorded_values→_valued→with_values→all

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_steps_dialog_carries_its_recorded_values · 4 checkswith_valuesoverlayREQ-DDB-WIKI-035 · measuredwith_valuesREQ-DDB-WIKI-049 · measuredallREQ-DDB-WIKI-054 · inferred

Requirements it verifies (1)

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

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