test_the_library_definition_outranks_a_test_helper¶
Tests › tests/test_test_scope.py
What this test is for
Why it exists
With the stage run, the library definition outranks the test helper.
Given
conn = _fixture(tmp_path, mark=True)
When
try: got = _common.resolve_rowid(conn, "run_turn") rows = _common.function_candidates(conn, "run_turn") finally: conn.close()
Then
- ✓ got equals LIBRARY
- ✓ rows[0][0] equals LIBRARY
- ✓ {r[0] for r in rows} equals {LIBRARY, HELPER}
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 · 6 of 226 steps
… 45 earlier steps
… 155 steps between
… 11 later steps
2 more
- Build this wiki from the index · 4 of 400 steps
- `main` (clew/guard/main.py) · 1 of 357 steps
tests/test_test_scope.py:155 · its file's page
What it checks (3)
assert got == LIBRARY, ( f"resolved to rowid {got}: the test helper won. It is IN PLACE while the real method " f"is declared in a header and defined out of line, so the in-place term favours it — " f"the test-scope term has to sort ahead of that one" )observesresolve_rowidviagotassert rows[0][0] == LIBRARY, f"candidates ranked the test helper first: {rows}"observesfunction_candidatesviarowsassert {r[0] for r in rows} == {LIBRARY, HELPER}, ( f"a test-code definition was dropped rather than demoted: {rows}" )observesfunction_candidatesviarows
Where the product reaches it
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 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-010 measured