test_retired_trace_subcommand_fails_loudly

Tests › tests/guard/test_guard_main.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Given

  1. result = main(["trace", "--req", "REQ-NONEXISTENT-9999"])
→

When

  1. —
→

Then

  1. ✓ result equals 1
  2. ✓ capsys.readouterr().err contains "was removed"

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.

`main` (clew/guard/main.py) · 2 of 357 steps

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pytry (line 717)trymain1. main → _check_retired_subcommand1_check_retired_subcommand▶ test enters2. _check_retired_subcommand → _first_positional2_first_positional3–4. main → _run3_run +1 more

… 353 later steps

tests/guard/test_guard_main.py:165 · its file's page

What it checks (2)

  1. assert result == 1 not attributed
  2. assert "was removed" in capsys.readouterr().err not attributed

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.

Also reaches 1 requirement

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