test_an_entry_with_nothing_extra_has_no_extra

Tests › tests/test_requirement_fields.py

passed Passed in the packaged run.

What this test is for

Why it exists

`extra` is NULL (absent), not `{}`, when every key was read.

Given

  1. catalog = tmp_path / "requirements.yaml"
  2. catalog.write_text("requirements:\n REQ-B-001:\n name: Close\n")
  3. db = tmp_path / "clew.db"
→

When

  1. ingest_requirements_yaml(db, catalog)
  2. (extra,) = sqlite3.connect(db).execute("SELECT extra FROM requirements").fetchone()
→

Then

  1. ✓ extra is None

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

`main` (clew/guard/main.py) · 1 of 357 steps

… 72 earlier steps

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyother filesother filesother filesother filesloop (line 973)looploop (line 974)looploop (line 287)looploop (line 288)loopmain73. _validate_files → check_satisfies73check_satisfies74. check_satisfies → link_ids74link_ids75. link_ids → satisfies_ids75satisfies_ids▶ test enters76. _validate_files → load_failure_mode_ids76load_failure_mode_ids77. load_failure_mode_ids → _get_requirements_config77_get_requirements_config

… 280 later steps

tests/test_requirement_fields.py:67 · its file's page

What it checks (1)

  1. assert extra is None 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_an_entry_with_nothing_extra_has_no_extra→ingest_requirements_yaml

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_an_entry_with_nothing_extra_has_no_extra · 1 checksingest_requirements_yamlresolve_catalog_columnsREQ-DDB-CONFIG-001 · measuredingest_requirements_yaml_is_flat_req_listREQ-DDB-CONFIG-003 · measuredingest_requirements_yamlREQ-DDB-SCHEMA-006 · measuredingest_requirements_yamlREQ-DDB-SCHEMA-015 · measuredingest_requirements_yaml_is_flat_req_listallREQ-DDB-WIKI-054 · inferred
Also reaches 5 requirements

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