test_two_shipped_headers_that_disagree_decide_nothing_on_either_side

Tests › tests/test_gate_polarity.py

passed Passed in the packaged run.

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

  1. conn = _macro_db(tmp_path)
  2. conn.execute( "INSERT INTO config_defaults VALUES ('MEM', 'on', '', 'include/adjust.h', 1, '', 'heuristic')" )
  3. gate = KconfigGate(symbol="MEM", macro="MEM", form="ifdef", file_path="platform.h", line=1)
→

When

  1. (served,) = _with_defaults(conn, (gate,))
→

Then

  1. ✓ sorted(macro_definitions(conn)["mem_calloc"]) equals [10, 11]
  2. ✓ served.default_state equals ""
  3. ✓ 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

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesloop (line 660)loopdossier67. _gate_columns → has_columns67has_columns68. gates_covering → _with_defaults68_with_defaults69. _with_defaults → table_exists69table_exists▶ test enters70. _with_defaults → _defaults_for_macros70_defaults_for_macros71. _with_defaults → decided_default71decided_default72. decided_default → is_shipped_config72is_shipped_config73. _with_defaults → _in_default_build73_in_default_build74. _macro_def → _macro_params74_macro_params

… 152 later steps

2 more

tests/test_gate_polarity.py:202 · its file's page

What it checks (2)

  1. assert sorted(macro_definitions(conn)["mem_calloc"]) == [10, 11] observes _macro_db via conn
  2. assert served.default_state == "" and served.in_default_build is None not attributed

Where the product reaches it

  • main → query_main → _payload → export_search → corpus_payload → kconfig_space → _gates → _with_defaults (flow)

Call flow

test_two_shipped_headers_that_disagree_decide_nothing_on_either_side→_macro_db→_with_defaults

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_two_shipped_headers_that_disagree_decide_nothing_on_either_side · 2 checks_with_defaultstable_existsREQ-DDB-QUERY-003 · measured_with_defaults_in_default_buildREQ-DDB-QUERY-004 · inferred_with_defaultsdecided_defaultREQ-DDB-QUERY-013 · measured
Also reaches 4 requirements

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