test_no_data_model_is_a_correct_negative¶
Tests › tests/test_datamodel.py
What this test is for
Why it exists
Most repositories have no generated data model, and the two public control targets are both in this state. Raising here would turn the stage into a gate on a feature nobody asked for — and the recorded zeros are what make the answer a measurement.
Given
(tmp_path / "src").mkdir()(tmp_path / "src" / "main.c").write_text("int main(void){return 0;}\n", encoding="utf-8")found = discover(tmp_path)
When
- —
Then
- ✓ found.keys equals ()
- ✓ found.manifests_unlisted equals 0
- ✓ found.as_meta()["dialect"] equals ""
- ✓ found.as_meta()["keys"] equals "0"
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) · 4 of 142 steps
… 8 earlier steps
… 126 later steps
2 more
- Build, refresh and check the index · 4 of 153 steps
- clew — `main` (clew/cli.py) · 4 of 400 steps
tests/test_datamodel.py:401 · its file's page
What it checks (4)
assert found.keys == ()not attributedassert found.manifests_unlisted == 0not attributedassert found.as_meta()["dialect"] == ""not attributedassert found.as_meta()["keys"] == "0"not attributed
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 4 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-CONFIG-007 measured
- REQ-DDB-INDEX-005 measured
- REQ-DDB-SCHEMA-013 measured