test_dot_directories_are_excluded_from_the_whole_repo_scope¶
Tests › tests/test_scope.py
What this test is for
Why it exists
Virtualenvs and tool caches live in dot-directories, and the whole-repo root is handed to doxygen unwalked — so the rule that prunes them has to travel as an EXCLUDE entry or it does not apply at all.
Verifies REQ-DDB-PIPE-014
Given
root = tmp_path / "repo"_write(root / "src" / "a.c")_write(root / ".venv" / "lib" / "vendor.c")
When
scope = sc.whole_repo_scope(root)
Then
- ✓ scope.source equals sc.SOURCE_WHOLE_REPO
- ✓ _rel_roots(scope, root) equals ["."]
- ✓ _rel_excludes(scope, root) contains ".venv"
- ✓ _rel_excludes(scope, root) does not contain "src"
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.
thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 20 of 142 steps
… 114 later steps
4 more
- Build, refresh and check the index · 20 of 153 steps
- clew — `main` (clew/cli.py) · 20 of 400 steps
- Build this wiki from the index · 2 of 400 steps
- `main` (clew/guard/main.py) · 2 of 357 steps
tests/test_scope.py:157 · its file's page
What it checks (4)
assert scope.source == sc.SOURCE_WHOLE_REPOobserveswhole_repo_scopeviascopeassert _rel_roots(scope, root) == ["."], "the repo itself is the one INPUT root"observes_rel_rootsassert ".venv" in _rel_excludes(scope, root)observes_rel_excludesassert "src" not in _rel_excludes(scope, root)observes_rel_excludes
Where the product reaches it
main→propose_main→propose→build_context→derive_scope→whole_repo_scope(flow)
Call flow
test_dot_directories_are_excluded_from_the_whole_repo_scope→whole_repo_scope→_write→_rel_roots→_rel_excludesWhat 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 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured