test_a_gate_carries_its_macros_shipped_default¶
Tests › tests/test_config_defaults.py
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
conn = _gate_db( tmp_path, "g.db", [("FEATURE_X", "off", "", "include/proj_config.h", 208, "", "declared")], )
When
gates, _ = gates_covering(conn, "src/platform.h", 20)conn.close()
Then
- ✓ len(gates) equals 1
- ✓ gates[0].default_state equals "off"
- ✓ 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
… 38 steps between
… 151 later steps
2 more
- `main` (scripts/export_parity.py) · 8 of 203 steps
- clew — `main` (clew/cli.py) · 7 of 400 steps
tests/test_config_defaults.py:307 · its file's page
What it checks (3)
assert len(gates) == 1not attributedassert gates[0].default_state == "off"not attributedassert 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
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 6 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-015 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-004 measured
- REQ-DDB-QUERY-006 measured
- REQ-DDB-QUERY-013 measured
- REQ-DDB-SCHEMA-012 measured