test_cli_apply_scope_replaces_input¶
Tests › tests/test_scope.py
What this test is for
Why it exists
The declared roots become the INPUT list (replace_input), with any explicit --extra-input appended on top rather than discarded.
Verifies REQ-DDB-PIPE-014
Given
root = _repo(tmp_path / "repo", _SIMPLE_CONFIG)_write(root / "src" / "a.c")
2 more
(root / ".clew.yaml").write_text("index_scope:\n roots: [src]\n", encoding="utf-8")args = _args( tmp_path / "clew.db", doxyfile=str(root / "Doxyfile"), scope=sc.SCOPE_FROM_GUARD, extra_input=["/elsewhere"], )
When
_apply_scope(args, root)
Then
- ✓ args.replace_input is True
- ✓ args.extra_input equals [str(root.resolve() / "src"), "/elsewhere"]
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) · 11 of 400 steps
… 10 earlier steps
… 18 steps between
… 20 steps between
… 329 later steps
2 more
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 10 of 142 steps
- Build this wiki from the index · 5 of 400 steps
tests/test_scope.py:179 · its file's page
What it checks (2)
assert args.replace_input is Trueobserves_argsviaargsassert args.extra_input == [str(root.resolve() / "src"), "/elsewhere"]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_replaces_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