test_given_when_then_come_from_the_syntax

Tests › tests/test_wiki_testcard.py

passed Passed in the packaged run.

What this test is for

Why it exists

Given = setup before the first product call; When = the product calls; Then = asserts.

Given

  1. html = _card()
  2. given, rest = html.split('class="tc-when"', 1)
  3. when, then = rest.split('class="tc-then"', 1)
→

When

  1. —
→

Then

  1. ✓ when contains "make_repo(tmp_path)"
  2. ✓ when contains "build_wiki(repo)"
  3. ✓ when contains "panel = site["flow-x.html"]"
  4. ✓ then contains "panel contains "traces/run.json""
  5. ✓ then contains "panel contains "confirmed""
  6. ✓ then contains "len(site) equals 3"
  7. ✓ then contains "site.get("error") is false"
  8. ✓ then.count('class="ck passed"') equals 4

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

What it checks (5)

  1. assert "make_repo(tmp_path)" in when and "build_wiki(repo)" in when not attributed
  2. assert "panel = site["flow-x.html"]" in when, ( "a statement after the first product call is When" ) not attributed
  3. assert ( "panel contains "traces/run.json"" in then and "panel contains "confirmed"" in then ) not attributed
  4. assert "len(site) equals 3" in then and "site.get("error") is false" in then not attributed
  5. assert then.count('class="ck passed"') == 4 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_given_when_then_come_from_the_syntax→_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_given_when_then_come_from_the_syntax · 5 checks_cardtest_cardREQ-DDB-WIKI-026 · measured
Also reaches 1 requirement

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