test_external_and_needs_reach_the_wiki_from_the_requirements_section¶
Tests › tests/test_requirements_section.py
What this test is for
Why it exists
F6: one pinned-catalog shape, `{repo, rev, path, name}`; the wiki reads it from here.
Given
root = _repo( tmp_path, "requirements:\n file: cat.yaml\n needs: docs/needs.json\n" " external:\n - {repo: ../kv, rev: v1.2.0, path: req.yaml, name: kv}\n", )
When
config, problems = load_wiki_config(root)
Then
- ✓ problems is false
- ✓ [(s.name, s.repo, s.pin, s.catalog) for s in config.catalogs] equals [ ("kv", "../kv", "v1.2.0", "req.yaml") ]
- ✓ config.needs equals "docs/needs.json"
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.
Build this wiki from the index · 41 of 400 steps
… 343 later steps
3 more
- `main` (clew/guard/main.py) · 4 of 357 steps
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 3 of 142 steps
- clew — `main` (clew/cli.py) · 3 of 400 steps
tests/test_requirements_section.py:128 · its file's page
What it checks (3)
assert not problems, problemsnot attributedassert [(s.name, s.repo, s.pin, s.catalog) for s in config.catalogs] == [ ("kv", "../kv", "v1.2.0", "req.yaml") ]not attributedassert config.needs == "docs/needs.json"not attributed
Where the product reaches it
build_wiki→load_wiki_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.
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-GUARD-012 measured
- REQ-DDB-WIKI-054 inferred