test_a_doxygen_guard_hook_id_fails_naming_it¶
Tests › tests/guard/test_guard_hard_cut.py
What this test is for
Why it exists
A `doxygen-guard` hook id in .pre-commit-config.yaml: rc 1, naming `clew-guard`.
Given
(_repo(tmp_path) / ".pre-commit-config.yaml").write_text( "repos:\n - repo: https://example.invalid/doxygen-guard\n rev: v1\n hooks:\n - id: doxygen-guard\n" )monkeypatch.chdir(tmp_path)err = capsys.readouterr().err
When
- —
Then
- ✓ main(["validate", "--no-git", "a.c"]) equals 1
- ✓ err contains "doxygen-guard"
- ✓ err contains "clew-guard"
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) · 18 of 357 steps
… 309 steps between
… 17 steps between
tests/guard/test_guard_hard_cut.py:48 · its file's page
What it checks (2)
assert main(["validate", "--no-git", "a.c"]) == 1not attributedassert "doxygen-guard" in err and "clew-guard" in err, errnot 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_a_doxygen_guard_hook_id_fails_naming_it→_repoWhat 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 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-GUARD-012 measured
- REQ-DDB-GUARD-013 measured
- REQ-DDB-GUARD-014 measured