test_setup_noise_is_kept_out_of_the_card

Tests › tests/test_wiki_testcard.py

passed Passed in the packaged run.

What this test is for

Why it exists

Owner review 3, found on test_an_imported_trace_is_drawn_over_its_test_flow: Given listed the test's own imports, and When began at a helper defined in the test file. Imports are not setup; a long panel shows three statements and folds the rest.

Given

  1. src = ( ["def test_n(tmp_path):", " from x import y"] + [f" v{i} = {i}" for i in range(7)] + [" assert v1 == 1"] )
  2. d = SimpleNamespace(name="test_n", file="tests/test_n.py", start=1)
2 more
  1. html = _card(lines=src, d=d, product=set())
  2. given = html.split('class="tc-given"', 1)[1]
→

When

  1. —
→

Then

  1. ✓ given does not contain "from x import y"
  2. ✓ given contains "v0 = 0"
  3. ✓ given contains "<details"
  4. ✓ given contains "5 more"

tests/test_wiki_testcard.py:115 · its file's page

What it checks (2)

  1. assert "from x import y" not in given and "v0 = 0" in given not attributed
  2. assert "<details" in given and "5 more" in given not attributed

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_setup_noise_is_kept_out_of_the_card→_card

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_setup_noise_is_kept_out_of_the_card · 2 checks_cardtest_cardREQ-DDB-WIKI-026 · measured
Also reaches 1 requirement

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