test_a_declared_config_header_outvotes_heuristic_ones¶
Tests › tests/test_gate_polarity.py
What this test is for
Why it exists
THE OPERATOR CAN SAY WHICH HEADER IS THE BUILD'S. `config_defaults` already tiers each row: `declared` for a header the repository states, `heuristic` for one that merely looks like a config header. mbedtls's motivating case, MBEDTLS_PLATFORM_MEMORY, is off in mbedtls_config.h and on in an alternative profile, so it is undecided by unanimity alone; with the shipped header declared, the declared rows decide and the other profiles do not vote.
Given
conn = _macro_db(tmp_path)conn.execute("UPDATE config_defaults SET origin = 'declared'")conn.execute( "INSERT INTO config_defaults VALUES ('MEM', 'on', '', 'profile.h', 1, '', 'heuristic')" )
When
- —
Then
- ✓ macro_definitions(conn)["mem_calloc"] equals [11]
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 · 1 of 226 steps
… 69 earlier steps
… 152 later steps
2 more
- clew — `main` (clew/cli.py) · 1 of 400 steps
- `main` (scripts/export_parity.py) · 1 of 203 steps
tests/test_gate_polarity.py:166 · its file's page
What it checks (1)
assert macro_definitions(conn)["mem_calloc"] == [11], "declared off wins over a heuristic on"observes_macro_dbviaconn
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_a_declared_config_header_outvotes_heuristic_ones→_macro_dbWhat 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 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-003 measured
- REQ-DDB-QUERY-013 measured