test_an_ambiguous_call_without_a_selector_behaves_as_before¶
Tests › tests/test_disambiguation.py
What this test is for
Why it exists
The control on the whole change. `qualified` must be OPTIONAL and omitting it must reproduce the previous behaviour exactly — the definition-preferring first row, with the alternatives listed in `candidates`. Without this assertion the change could be a breaking one and every other test here would still pass.
Given
- —
When
ref = q.resolve_symbol(shared_name_db, "harvest")all(c.qualified for c in ref.candidates)
Then
- ✓ ref is not None
- ✓ ref.rowid equals OVERRIDE_A
- ✓ {c.qualified for c in ref.candidates} equals {BASE_QUALIFIED, A_QUALIFIED, B_QUALIFIED}
- ✓ all(c.qualified for c in ref.candidates) holds
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 · 10 of 226 steps
… 17 earlier steps
… 23 steps between
… 24 steps between
… 105 steps between
… 31 later steps
3 more
- Build this wiki from the index · 4 of 400 steps
- clew — `main` (clew/cli.py) · 3 of 400 steps
- `main` (scripts/export_parity.py) · 3 of 203 steps
tests/test_disambiguation.py:174 · its file's page
What it checks (4)
assert ref is not Noneobservesresolve_symbolviarefassert ref.rowid == OVERRIDE_A, "the definition-preferring pick must not have moved"observesresolve_symbolviarefassert {c.qualified for c in ref.candidates} == {BASE_QUALIFIED, A_QUALIFIED, B_QUALIFIED}observesresolve_symbolviarefassert all(c.qualified for c in ref.candidates)observesall
Where the product reaches it
dossier→_rank_enum_over_mirror→_class_side_is_only_enum_mirrors→all(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 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-004 measured
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-010 measured
- REQ-DDB-WIKI-054 inferred