test_import_shared_key_edges_declared_yaml_manifest

Tests › tests/test_build_docs_db.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Verifies REQ-DDB-PIPE-001 REQ-DDB-PIPE-010

Given

  1. db_path = _make_shared_key_db( tmp_path, [(1, "handle_ping_cmd", 1, 3), (2, "handle_sound_event_findme", 5, 8)], )
  2. data_model_path = tmp_path / "data_model.yaml"
  3. data_model_path.write_text( "keys:\n" " - name: ROBOT_SOUND_EVENT_TYPE\n" " event: true\n" " writers: [handle_ping_cmd]\n" " readers: [handle_sound_event_findme]\n", )
→

When

  1. import_shared_key_edges_declared(db_path, data_model_path)
  2. conn = sqlite3.connect(str(db_path))
  3. rows = conn.execute( "SELECT writer_rowid, reader_rowid, key_name, edge_kind, declared FROM shared_key_edges", ).fetchall()
  4. conn.close()
→

Then

  1. ✓ rows equals [(1, 2, "ROBOT_SOUND_EVENT_TYPE", "event", 1)]

tests/test_build_docs_db.py:1964 · its file's page

What it checks (1)

  1. assert rows == [(1, 2, "ROBOT_SOUND_EVENT_TYPE", "event", 1)] 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_import_shared_key_edges_declared_yaml_manifest→_make_shared_key_db→import_shared_key_edges_declared

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_import_shared_key_edges_declared_yaml_manifest · 1 checksimport_shared_key_edges_declared_definition_preferring_name_indexREQ-DDB-QUERY-003 · measuredimport_shared_key_edges_declared… 3 calls …_coerce_edge_triggeredREQ-DDB-SCHEMA-002 · measuredimport_shared_key_edges_declaredREQ-DDB-SCHEMA-005 · measuredimport_shared_key_edges_declared_ensure_shared_key_edges_tableREQ-DDB-SCHEMA-007 · measured

Requirements it verifies (2)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-001catalogunknown
REQ-DDB-PIPE-010catalogunknown
Also reaches 5 requirements

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