test_the_library_definition_outranks_a_test_helper

Tests › tests/test_test_scope.py

passed Passed in the packaged run.

What this test is for

Why it exists

With the stage run, the library definition outranks the test helper.

Given

  1. conn = _fixture(tmp_path, mark=True)
→

When

  1. try: got = _common.resolve_rowid(conn, "run_turn") rows = _common.function_candidates(conn, "run_turn") finally: conn.close()
→

Then

  1. ✓ got equals LIBRARY
  2. ✓ rows[0][0] equals LIBRARY
  3. ✓ {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

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesdossier46. _ambiguity_counts → table_exists46table_exists47. _ambiguity_counts → function_candidates47function_candidates48. function_candidates → table_exists48table_exists▶ test enters49–51. function_candidates → _test_scope_term49_test_scope_term +2 more52–53. matching_identity → qualified_name_of52qualified_name_of +1 more

… 155 steps between

callercallercallercallerclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pyother filesother filesother filesother filesloop (line 558)looploop (line 570)loopopt (line 239)optopt (line 285)optdossier209. chain_trace → _expand_neighbor209_expand_neighbor210. _expand_neighbor → resolve_rowid210resolve_rowid211. resolve_rowid → table_exists211table_exists▶ test enters212. resolve_rowid → function_candidates212function_candidates213. resolve_rowid → _test_scope_term213_test_scope_term214. _expand_neighbor → _make_node214_make_node215. subject_payload → _flatten_subject215_flatten_subject

… 11 later steps

2 more

tests/test_test_scope.py:155 · its file's page

What it checks (3)

  1. 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" ) observes resolve_rowid via got
  2. assert rows[0][0] == LIBRARY, f"candidates ranked the test helper first: {rows}" observes function_candidates via rows
  3. assert {r[0] for r in rows} == {LIBRARY, HELPER}, ( f"a test-code definition was dropped rather than demoted: {rows}" ) observes function_candidates via rows

Where the product reaches it

  • dossier → identity_rowids → function_candidates (flow)
  • dossier → _chain_for → chain_trace → _expand_neighbor → resolve_rowid (flow)

Call flow

test_the_library_definition_outranks_a_test_helper→_fixture→resolve_rowid→function_candidates

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_the_library_definition_outranks_a_test_helper · 3 checksresolve_rowidREQ-DDB-QUERY-003 · measuredresolve_rowidREQ-DDB-QUERY-010 · measured
Also reaches 2 requirements

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