test_import_shared_key_edges_declared_event_edge

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.toml"
  3. data_model_path.write_text( """ [[keys]] name = "ROBOT_SOUND_EVENT_TYPE" persistent = false event = true writers = ["handle_ping_cmd"] readers = ["handle_sound_event_findme"] """, )
→

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, " "source, confidence FROM shared_key_edges", ).fetchall()
  4. conn.close()
→

Then

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

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.

Build this wiki from the index · 1 of 400 steps

… 96 earlier steps

callercallercallercallerother filesother filesother filesother filesloop (line 223)looploop (line 224)looploop (line 74)looploop (line 78)loopbuild_wiki97–98. console_scripts → _read_toml97_read_toml +1 more99. require_toml_module → toml_module99toml_module▶ test enters100. console_scripts → _nested100_nested101. _scripts → _defined101_defined

… 299 later steps

1 more

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

What it checks (1)

  1. assert rows == [ (1, 2, "ROBOT_SOUND_EVENT_TYPE", "event", 1, "shared_key_declared", "high"), ] 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_event_edge→_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_event_edge · 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.