test_udm_default_is_unresolved_not_absent¶
Tests › tests/test_datamodel.py
What this test is for
Why it exists
THE DISTINCTION THIS COLUMN EXISTS FOR, and all three states are in one assertion because separated they mislead. A UDM key's default is a base plus per-variant siblings that only a build's variant selection resolves, so no value is stored — but a key that declares NO default (280 of 1,606 in the measured corpus) must be distinguishable from one that declares several. `Uptime` is the empty case, and it is what makes this test fail against an implementation that simply marks every UDM key unresolved.
Given
path = tmp_path / "widgetbus_001.yaml"path.write_text(UDM_MANIFEST, encoding="utf-8")
When
keys = parse_udm_manifest(path, tmp_path)by_id = {k.key_id: k for k in keys}all(k.default_value is None and k.enum_name is None for k in keys)
Then
- ✓ keys is not None
- ✓ all(k.default_value is None and k.enum_name is None for k in keys) holds
- ✓ by_id["Sample of Rate"].unresolved_fields equals ("default_value",)
- ✓ by_id["Mode_Select"].unresolved_fields equals ("default_value", "enum_set")
- ✓ by_id["Uptime"].unresolved_fields equals ()
tests/test_datamodel.py:562 · its file's page
What it checks (5)
assert keys is not Noneobservesparse_udm_manifestviakeysassert all(k.default_value is None and k.enum_name is None for k in keys)observesallassert by_id["Sample of Rate"].unresolved_fields == ("default_value",)not attributedassert by_id["Mode_Select"].unresolved_fields == ("default_value", "enum_set")not attributedassert by_id["Uptime"].unresolved_fields == ()not attributed
Where the product reaches it
dossier→_rank_enum_over_mirror→_class_side_is_only_enum_mirrors→all(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 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-003 measured
- REQ-DDB-SCHEMA-013 measured
- REQ-DDB-WIKI-054 inferred