test_manifest_is_parsed¶
Tests › tests/test_datamodel.py
What this test is for
Why it exists
Asserts the per-key metadata as well as the names, because the metadata IS the second of the three gains and nothing else in the index carries a key's type or default.
Given
path = tmp_path / "widgetbus.toml"path.write_text(MANIFEST, encoding="utf-8")
When
keys = parse_ingot_manifest(path, tmp_path)charge = next(k for k in keys if k.key_id == "Is_Charging")
Then
- ✓ keys is not None
- ✓ tuple(k.define_name for k in keys) equals DEFINES
- ✓ (charge.value_type, charge.default_value, charge.enum_name) equals ( "bool", "False", "widget_mode", )
- ✓ charge.helpers is True
- ✓ charge.dialect equals DIALECT_INGOT
- ✓ Path(charge.manifest).is_absolute() is false
- ✓ charge.manifest equals "widgetbus.toml"
tests/test_datamodel.py:259 · its file's page
What it checks (7)
assert keys is not Noneobservesparse_ingot_manifestviakeysassert tuple(k.define_name for k in keys) == DEFINESobservesparse_ingot_manifestviakeysassert (charge.value_type, charge.default_value, charge.enum_name) == ( "bool", "False", "widget_mode", )not attributedassert charge.helpers is Truenot attributedassert charge.dialect == DIALECT_INGOTnot attributedassert not Path(charge.manifest).is_absolute()not attributedassert charge.manifest == "widgetbus.toml"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