test_setup_noise_is_kept_out_of_the_card¶
Tests › tests/test_wiki_testcard.py
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
src = ( ["def test_n(tmp_path):", " from x import y"] + [f" v{i} = {i}" for i in range(7)] + [" assert v1 == 1"] )d = SimpleNamespace(name="test_n", file="tests/test_n.py", start=1)
2 more
html = _card(lines=src, d=d, product=set())given = html.split('class="tc-given"', 1)[1]
When
- —
Then
- ✓ given does not contain "from x import y"
- ✓ given contains "v0 = 0"
- ✓ given contains "<details"
- ✓ given contains "5 more"
tests/test_wiki_testcard.py:115 · its file's page
What it checks (2)
assert "from x import y" not in given and "v0 = 0" in givennot attributedassert "<details" in given and "5 more" in givennot 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→_cardWhat 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.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-026 measured