test_udm_identity_is_the_name_not_the_int_id

Tests › tests/test_datamodel.py

passed Passed in the packaged run.

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

  1. path = tmp_path / "widgetbus_001.yaml"
  2. path.write_text(UDM_MANIFEST, encoding="utf-8")
→

When

  1. keys = parse_udm_manifest(path, tmp_path)
  2. composed = {k.define_name for k in keys}
→

Then

  1. ✓ keys is not None
  2. ✓ composed equals set(UDM_DEFINES)
  3. ✓ 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)

  1. assert keys is not None observes parse_udm_manifest via keys
  2. assert composed == set(UDM_DEFINES) not attributed
  3. assert 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

test_udm_identity_is_the_name_not_the_int_id→parse_udm_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_udm_identity_is_the_name_not_the_int_id · 3 checksparse_udm_manifestrel_keyREQ-DDB-PIPE-003 · measuredparse_udm_manifestREQ-DDB-SCHEMA-013 · measured
Also reaches 2 requirements

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