test_a_gate_carries_its_macros_shipped_default

Tests › tests/test_config_defaults.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE JOIN THAT ANSWERS THE QUESTION, and the reason the harvest layer alone is worth nothing. `form` says "present when this symbol is set"; the default says whether it IS set. Only the two together answer "is this code compiled in", which is what the mbedtls marks asked and the index-only arm scored 0/3 on.

Given

  1. conn = _gate_db( tmp_path, "g.db", [("FEATURE_X", "off", "", "include/proj_config.h", 208, "", "declared")], )
→

When

  1. gates, _ = gates_covering(conn, "src/platform.h", 20)
  2. conn.close()
→

Then

  1. ✓ len(gates) equals 1
  2. ✓ gates[0].default_state equals "off"
  3. ✓ gates[0].default_site equals "include/proj_config.h:208"

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 · 12 of 226 steps

… 17 earlier steps

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pydossier18. _documentation_mentions → table_exists18table_exists19. _documentation_mentions → has_columns19has_columns20. has_columns → table_exists20table_exists21–22. _hint_from → _name_exists21_name_exists +1 more

… 38 steps between

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesloop (line 660)looploop ×2 (line 288)loop ×2dossier61–62. macro_definitions_conn → _macro_def61_macro_def +1 more63. gates_covering → table_exists63table_exists▶ test enters64. gates_covering → has_columns64has_columns65. gates_covering → _gate_columns65_gate_columns66–67. _gate_columns → has_columns66has_columns ×268. gates_covering → _with_defaults68_with_defaults69. _with_defaults → table_exists69table_exists70. _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_params75. _macro_params → table_exists75table_exists

… 151 later steps

2 more

tests/test_config_defaults.py:307 · its file's page

What it checks (3)

  1. assert len(gates) == 1 not attributed
  2. assert gates[0].default_state == "off" not attributed
  3. assert gates[0].default_site == "include/proj_config.h:208" not attributed

Where the product reaches it

  • dossier → subject_payload → _flatten_subject → _gate_definitions → macro_definitions → macro_definitions_conn → _macro_def → gates_covering (flow)

Call flow

test_a_gate_carries_its_macros_shipped_default→_gate_db→gates_covering

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_a_gate_carries_its_macros_shipped_default · 3 checks_gate_dbensure_config_defaults_tableREQ-DDB-PIPE-015 · measuredgates_coveringtable_existsREQ-DDB-QUERY-003 · measuredgates_covering_with_defaults_in_default_buildREQ-DDB-QUERY-004 · measuredgates_coveringREQ-DDB-QUERY-006 · measuredgates_covering_with_defaultsdecided_defaultREQ-DDB-QUERY-013 · measured
Also reaches 6 requirements

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