test_index_takes_only_all_tool_statements¶
Tests › tests/test_toolchain.py
What this test is for
Given
(tmp_path / "toolchain.toml").write_text( '[ignore]\npaths = ["vendor/**"]\n[clew.ignore]\npaths = ["legacy/**"]\n' '[knots.ignore]\npaths = ["bench/**"]\n' )(tmp_path / "suppress.toml").write_text( '[[suppress]]\nname = "a"\ntool = "*"\nfile_glob = "third_party/**"\n' '[[suppress]]\nname = "b"\ntool = "*"\nfile = "gen.c"\n' '[[suppress]]\nname = "c"\ntool = "clew"\nfile_glob = "doc_only/**"\n' '[[suppress]]\nname = "d"\ntool = "*"\nrule = "r"\nfile = "src/x.c"\n' '[[suppress]]\nname = "e"\ntool = "knots"\nfile_glob = "src/**"\n' )
When
config = load_toolchain_config(tmp_path)
Then
- ✓ config.index_globs equals ("vendor/**", "third_party/**", "gen.c")
- ✓ set(config.gate_globs) equals { "vendor/**", "third_party/**", "gen.c", "legacy/**", "doc_only/**", }
- ✓ config.sources(tmp_path) equals "toolchain.toml, suppress.toml"
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) · 9 of 357 steps
… 85 earlier steps
… 256 later steps
1 more
- Build this wiki from the index · 1 of 400 steps
tests/test_toolchain.py:43 · its file's page
What it checks (3)
assert config.index_globs == ("vendor/**", "third_party/**", "gen.c")observesload_toolchain_configviaconfigassert set(config.gate_globs) == { "vendor/**", "third_party/**", "gen.c", "legacy/**", "doc_only/**", }observesload_toolchain_configviaconfigassert config.sources(tmp_path) == "toolchain.toml, suppress.toml"observesload_toolchain_configviaconfig
Where the product reaches it
main→_run→run_precommit→_validate_files→validate_file→gate_exclusion→_gate_matcher→load_toolchain_config(flow)
Call flow
What 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-011 | catalog | unknown |
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-009 measured
- REQ-DDB-WIKI-054 inferred