test_manifest_is_parsed

Tests › tests/test_datamodel.py

passed Passed in the packaged run.

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

  1. path = tmp_path / "widgetbus.toml"
  2. path.write_text(MANIFEST, encoding="utf-8")
→

When

  1. keys = parse_ingot_manifest(path, tmp_path)
  2. charge = next(k for k in keys if k.key_id == "Is_Charging")
→

Then

  1. ✓ keys is not None
  2. ✓ tuple(k.define_name for k in keys) equals DEFINES
  3. ✓ (charge.value_type, charge.default_value, charge.enum_name) equals ( "bool", "False", "widget_mode", )
  4. ✓ charge.helpers is True
  5. ✓ charge.dialect equals DIALECT_INGOT
  6. ✓ Path(charge.manifest).is_absolute() is false
  7. ✓ charge.manifest equals "widgetbus.toml"

tests/test_datamodel.py:259 · its file's page

What it checks (7)

  1. assert keys is not None observes parse_ingot_manifest via keys
  2. assert tuple(k.define_name for k in keys) == DEFINES observes parse_ingot_manifest via keys
  3. assert (charge.value_type, charge.default_value, charge.enum_name) == ( "bool", "False", "widget_mode", ) not attributed
  4. assert charge.helpers is True not attributed
  5. assert charge.dialect == DIALECT_INGOT not attributed
  6. assert not Path(charge.manifest).is_absolute() not attributed
  7. assert 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

test_manifest_is_parsed→parse_ingot_manifest

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.

test_manifest_is_parsed · 7 checksparse_ingot_manifestrel_keyREQ-DDB-PIPE-003 · measuredparse_ingot_manifestREQ-DDB-SCHEMA-013 · measured
Also reaches 2 requirements

Its run touches their code; that is reach, not proof.