test_two_shipped_headers_that_disagree_decide_nothing_on_either_side¶
Tests › tests/test_gate_polarity.py
What this test is for
Why it exists
NO LAST-ROW-WINS ANYWHERE. Both sides used to differ here: the query layer kept whichever shipped row it met last, the build kept both definitions. Now both say undecided.
Given
conn = _macro_db(tmp_path)conn.execute( "INSERT INTO config_defaults VALUES ('MEM', 'on', '', 'include/adjust.h', 1, '', 'heuristic')" )gate = KconfigGate(symbol="MEM", macro="MEM", form="ifdef", file_path="platform.h", line=1)
When
(served,) = _with_defaults(conn, (gate,))
Then
- ✓ sorted(macro_definitions(conn)["mem_calloc"]) equals [10, 11]
- ✓ served.default_state equals ""
- ✓ served.in_default_build 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.
Look up one name: everything the index holds about it · 4 of 226 steps
… 66 earlier steps
… 152 later steps
2 more
- clew — `main` (clew/cli.py) · 4 of 400 steps
- `main` (scripts/export_parity.py) · 4 of 203 steps
tests/test_gate_polarity.py:202 · its file's page
What it checks (2)
assert sorted(macro_definitions(conn)["mem_calloc"]) == [10, 11]observes_macro_dbviaconnassert served.default_state == "" and served.in_default_build is Nonenot attributed
Where the product reaches it
main→query_main→_payload→export_search→corpus_payload→kconfig_space→_gates→_with_defaults(flow)
Call flow
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.
Also reaches 4 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-003 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-004 inferred
- REQ-DDB-QUERY-013 measured