test_python_steps_follow_the_control_flow_with_absolute_lines

Tests › tests/test_wiki_activity.py

passed Passed in the packaged run.

What this test is for

Why it exists

`ast`: the docstring is not a step; lines are the file's (the body starts at 20).

Given

  1. —
→

When

  1. steps = steps_of(_PY.splitlines(), "src/m.py", first_line=20)
→

Then

  1. ✓ [(s.kind, s.depth) for s in steps] equals _EXPECTED
  2. ✓ [s.first for s in steps] equals [22, 23, 24, 25, 26, 27, 28]
  3. ✓ steps[1].text equals "for item in items"
  4. ✓ steps[-1].text equals "return out"

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

… 273 earlier steps

callercallercallercallerclew/wiki/symbols.pyclew/wiki/symbols.pyclew/wiki/symbols.pyclew/wiki/symbols.pyclew/wiki/activity.pyclew/wiki/activity.pyclew/wiki/activity.pyclew/wiki/activity.pyloop (line 360)loopopt (line 374)optopt (line 64)optopt (line 160)optopt (line 231)optopt (line 232)optloop (line 187)loopelif (line 195)elifbuild_wiki274. _section → _activity274_activity275. _activity → steps_of275steps_of276. steps_of → _py_steps276_py_steps▶ test enters277–280. _py_steps → _py_block277_py_block +3 more281–282. _py_orelse → _py_block281_py_block +1 more283. _py_orelse → _py_block283_py_block284. _py_block → _py_block284_py_block285. _py_block → 285… 3 calls not run286. _py_steps → _without_docstring286_without_docstring287–288. steps_of → _c_steps287_c_steps +1 more

… 112 later steps

tests/test_wiki_activity.py:49 · its file's page

What it checks (3)

  1. assert [(s.kind, s.depth) for s in steps] == _EXPECTED observes steps_of via steps
  2. assert [s.first for s in steps] == [22, 23, 24, 25, 26, 27, 28] observes steps_of via steps
  3. assert steps[1].text == "for item in items" and steps[-1].text == "return out" observes steps_of via steps

Where the product reaches it

  • build_wiki → _build_site → symbol_pages → _section → _activity → steps_of (flow)

Call flow

test_python_steps_follow_the_control_flow_with_absolute_lines→steps_of

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_python_steps_follow_the_control_flow_with_absolute_lines · 3 checkssteps_ofREQ-DDB-WIKI-045 · measured
Also reaches 1 requirement

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