test_no_data_model_is_a_correct_negative

Tests › tests/test_datamodel.py

passed Passed in the packaged run.

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

  1. (tmp_path / "src").mkdir()
  2. (tmp_path / "src" / "main.c").write_text("int main(void){return 0;}\n", encoding="utf-8")
  3. found = discover(tmp_path)
→

When

  1. —
→

Then

  1. ✓ found.keys equals ()
  2. ✓ found.manifests_unlisted equals 0
  3. ✓ found.as_meta()["dialect"] equals ""
  4. ✓ 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

thread startthread startthread startthread startclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyother filesother filesother filesother filesopt (line 845)optloop (line 1239)loopopt (line 847)optloop (line 746)loop_first_build_worker9. whole_repo_scope → list9list10. whole_repo_scope → nested_repo_roots10nested_repo_roots11. nested_repo_roots → _nested_repos_under11_nested_repos_under▶ test enters12–14. _nested_repos_under → _warn_unwalkable12_warn_unwalkable +2 more15. nested_repo_roots → _nested_repos_under15_nested_repos_under16. whole_repo_scope → _gitignored_paths16_gitignored_paths

… 126 later steps

2 more

tests/test_datamodel.py:401 · its file's page

What it checks (4)

  1. assert found.keys == () not attributed
  2. assert found.manifests_unlisted == 0 not attributed
  3. assert found.as_meta()["dialect"] == "" not attributed
  4. assert 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.