test_cli_apply_scope_indexes_the_whole_repo_without_a_declaration¶
Tests › tests/test_scope.py
What this test is for
Why it exists
The undeclared branch must not half-apply. It used to `return` before replacing anything, handing INPUT back to the Doxyfile; gh#333 makes it fold a real whole-repo scope, so `replace_input` is True and the repo root is the root list.
Verifies REQ-DDB-PIPE-014
Given
root = tmp_path / "repo"_write(root / "src" / "a.c")args = _args( tmp_path / "clew.db", doxyfile=str(root / "Doxyfile"), scope=sc.SCOPE_FROM_GUARD, )
When
_apply_scope(args, root)
Then
- ✓ 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:273 · its file's page
What it checks (2)
assert 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_indexes_the_whole_repo_without_a_declaration→_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