test_macro_hop_names_the_macro_that_made_the_edge

Tests › tests/test_build_docs_db.py

passed Passed in the packaged run.

What this test is for

Why it exists

gh#350. A macro-hop edge is the ONE layer whose edge corresponds to no text in the caller's body — the call is written as a macro invocation, so searching `producer` for `store_set` finds nothing. Before this the caller saw an edge at confidence `resolved` and could not see what produced it.

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

Given

  1. —
→

When

  1. build_call_edges(macro_hop_db)
  2. import_macro_hop_edges(macro_hop_db)
  3. conn = sqlite3.connect(str(macro_hop_db))
2 more
  1. rows = conn.execute( "SELECT e.callee_rowid, m.name FROM call_edges e " "JOIN memberdef m ON m.rowid = e.via_macro_rowid " "WHERE e.source = 'macro_hop' ORDER BY e.callee_rowid", ).fetchall()
  2. conn.close()
→

Then

  1. ✓ rows equals [(3, "STORE_SET_FOO"), (5, "STORE_SET_FOO")]

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

What it checks (1)

  1. assert rows == [(3, "STORE_SET_FOO"), (5, "STORE_SET_FOO")] 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_macro_hop_names_the_macro_that_made_the_edge→build_call_edges→import_macro_hop_edges

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_macro_hop_names_the_macro_that_made_the_edge · 1 checksbuild_call_edgesREQ-DDB-PIPE-003 · measured

Requirements it verifies (2)

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

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