test_udm_identity_is_the_name_not_the_int_id¶
Tests › tests/test_datamodel.py
What this test is for
Why it exists
4 of 233 classes and 14 of 1,606 keys in the measured corpus carry an int `id`, so a reader keying off it would key off a field the corpus almost entirely omits — and would compose an accessor name no generated code carries, making every such key read as never observed. The fixture puts an `id` on the class AND on one key so both levels are covered.
Given
path = tmp_path / "widgetbus_001.yaml"path.write_text(UDM_MANIFEST, encoding="utf-8")
When
keys = parse_udm_manifest(path, tmp_path)composed = {k.define_name for k in keys}
Then
- ✓ keys is not None
- ✓ composed equals set(UDM_DEFINES)
- ✓ any("4" in name or "11" in name for name in composed) is false
tests/test_datamodel.py:537 · its file's page
What it checks (3)
assert keys is not Noneobservesparse_udm_manifestviakeysassert composed == set(UDM_DEFINES)not attributedassert not any("4" in name or "11" in name for name in composed)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
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-PIPE-003 measured
- REQ-DDB-SCHEMA-013 measured