test_cli_apply_scope_default_replaces_the_doxyfile_input¶
Tests › tests/test_scope.py
What this test is for
Why it exists
THE INVERSION gh#333 FIXES, asserted from the CLI surface. A repo that ships a Doxyfile and declares no index scope used to keep the Doxyfile's INPUT — its published-API subset — while an otherwise identical repo WITHOUT a Doxyfile got its whole tree. The default now replaces INPUT in both cases.
Verifies REQ-DDB-PIPE-014
Given
root = _repo(tmp_path / "repo", _SIMPLE_CONFIG)_write(root / "src" / "a.c")args = _args(tmp_path / "clew.db", doxyfile=str(root / "Doxyfile"))
When
_apply_scope(args, root)
Then
- ✓ args.scope equals sc.SCOPE_FROM_GUARD
- ✓ args.replace_input is True
- ✓ args.extra_input equals [str(root.resolve())]
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.
clew — `main` (clew/cli.py) · 24 of 400 steps
… 10 earlier steps
… 26 steps between
… 329 later steps
4 more
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 23 of 142 steps
- Build, refresh and check the index · 20 of 153 steps
- Build this wiki from the index · 3 of 400 steps
- `main` (clew/guard/main.py) · 2 of 357 steps
tests/test_scope.py:242 · its file's page
What it checks (3)
assert args.scope == sc.SCOPE_FROM_GUARD, ( "gh#333 flipped the default, and the 22->6 collapse must not have moved it: the " "parser default is the ONLY declaration of it left in the tool" )observes_argsviaargsassert args.replace_input is Trueobserves_argsviaargsassert args.extra_input == [str(root.resolve())]observes_argsviaargs
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_cli_apply_scope_default_replaces_the_doxyfile_input→_repo→_write→_args→_apply_scopeWhat 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)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-014 | catalog | unknown |
Also reaches 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-GUARD-012 inferred
- REQ-DDB-WIKI-054 inferred