test_udm_is_read_without_a_toml_parser¶
Tests › tests/test_datamodel.py
What this test is for
Why it exists
A MISSING TOML PARSER USED TO STOP THE WHOLE PASS, and once the second dialect became readable that was a "could not look" about a half that was perfectly readable. The UDM dialect is YAML; only the ingot dialect needs `tomllib` or the `tomli` backport. So `toml_unavailable` narrows to what it can honestly claim, and the ingot manifest beside the UDM one is what proves the flag still means something.
Given
root = _repo( tmp_path, {"widgetbus.toml": MANIFEST, "widgetbus_001.yaml": UDM_MANIFEST}, DEFINES + UDM_DEFINES, )monkeypatch.setattr("clew.datamodel.toml_module", lambda: None)found = discover(root)
When
- —
Then
- ✓ found.toml_unavailable is True
- ✓ found.as_meta()["toml_unavailable"] equals "1"
- ✓ {k.define_name for k in found.keys} equals set(UDM_DEFINES)
- ✓ found.dialects() equals (DIALECT_UDM,)
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:724 · its file's page
What it checks (4)
assert found.toml_unavailable is Truenot attributedassert found.as_meta()["toml_unavailable"] == "1"not attributedassert {k.define_name for k in found.keys} == set(UDM_DEFINES)not attributedassert found.dialects() == (DIALECT_UDM,)not attributed
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
test_udm_is_read_without_a_toml_parser→_repoWhat 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 5 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-PIPE-003 measured
- REQ-DDB-SCHEMA-013 measured