test_false_default_is_not_zero¶
Tests › tests/test_datamodel.py
What this test is for
Why it exists
A boolean default and a numeric zero default are different facts about a key, and `str(False)` is not `"0"`. The `Threshold` key's default IS `0`, so the two appear in one fixture and a coercion that flattened them together is visible.
Given
path = tmp_path / "widgetbus.toml"path.write_text(MANIFEST, encoding="utf-8")
When
keys = parse_ingot_manifest(path, tmp_path)by_id = {k.key_id: k.default_value for k in keys}
Then
- ✓ keys is not None
- ✓ by_id["Is_Charging"] equals "False"
- ✓ by_id["Threshold"] equals "0"
tests/test_datamodel.py:293 · its file's page
What it checks (3)
assert keys is not Noneobservesparse_ingot_manifestviakeysassert by_id["Is_Charging"] == "False"not attributedassert by_id["Threshold"] == "0"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