test_help_without_subcommand_prints_help_and_writes_nothing

Tests › tests/guard/test_guard_rust.py

passed Passed in the packaged run.

What this test is for

Why it exists

`--help` with no subcommand used to fall into pre-commit mode, which ignores unknown flags — so asking for help ran the gate and wrote an impact report.

Verifies REQ-DDB-GUARD-024

Given

  1. monkeypatch.chdir(tmp_path)
→

When

  1. list(Path(tmp_path).iterdir())
→

Then

  1. ✓ main(["--help"]) equals 0
  2. ✓ capsys.readouterr().out contains "usage: clew guard"
  3. ✓ list(Path(tmp_path).iterdir()) equals []

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) · 13 of 357 steps

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyother filesother filesother filesother filestry (line 717)trymain1. main → _check_retired_subcommand1_check_retired_subcommand▶ test enters2. _check_retired_subcommand → _first_positional2_first_positional3–7. main → _run3_run +4 more8. _add_validate_parser → list8list9. list → link9link10–14. build_parser → _add_impact_parser10_add_impact_parser +4 more15–16. _run → _has_subcommand15_has_subcommand +1 more

… 341 later steps

tests/guard/test_guard_rust.py:237 · its file's page

What it checks (3)

  1. assert main(["--help"]) == 0 not attributed
  2. assert "usage: clew guard" in capsys.readouterr().out not attributed
  3. assert list(Path(tmp_path).iterdir()) == [] observes list

Where the product reaches it

  • dossier → subject_payload → _flatten_subject → list (flow)

Call flow

test_help_without_subcommand_prints_help_and_writes_nothing→list

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.

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-GUARD-024catalogunknown
Also reaches 1 requirement

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