test_every_block_is_a_wedge_and_wedges_do_not_overlap

Tests › tests/test_wiki_web.py

passed Passed in the packaged run.

What this test is for

Why it exists

Spokes: one angular range per block, in declared order, disjoint, inside one turn.

Given

  1. blocks = _data(db)["blocks"]
  2. spans = [(b["a0"], b["a1"]) for b in blocks]
→

When

  1. all(0 <= a0 < a1 <= 2 * math.pi + 1e-9 for a0, a1 in spans)
  2. all(spans[i][1] <= spans[i + 1][0] for i in range(len(spans) - 1))
→

Then

  1. ✓ [b["id"] for b in blocks] equals ["API", "Core"]
  2. ✓ all(0 <= a0 < a1 <= 2 * math.pi + 1e-9 for a0, a1 in spans) holds
  3. ✓ all(spans[i][1] <= spans[i + 1][0] for i in range(len(spans) - 1)) 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.

Build this wiki from the index · 20 of 400 steps

… 140 earlier steps

callercallercallercallercallerclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/wiki/flowpage.pyclew/wiki/flowpage.pyclew/wiki/flowpage.pyclew/wiki/flowpage.pyclew/wiki/flowpage.pyother filesother filesother filesother filesother filesloop (line 204)looploop (line 206)loopopt (line 373)optloop (line 373)looploop (line 282)loopopt (line 442)optloop (line 122)looploop (line 207)looptry (line 209)trybuild_wiki141. parse_contexts → _context_test141_context_test142. _build_site → build_graph142build_graph143. build_graph → connect143connect▶ test enters144. build_graph → _tested_calls144_tested_calls145. _tested_calls → table_exists145table_exists146. build_graph → _links146_links147. _links → table_exists147table_exists148. _links → _bump148_bump149. _links → table_exists149table_exists150. _links → 150… 1 call not run151. build_graph → _threads151_threads152. _threads → table_exists152table_exists153. build_graph → _vendor_calls_in153_vendor_calls_in154. _vendor_calls_in → table_exists154table_exists155. _vendor_calls_in → is_vendor155is_vendor156–157. build_graph → _components156_components +1 more158. _components → _impact_into158_impact_into159–164. build_graph → is_vendor159is_vendor +5 more165. _build_site → flow_page165flow_page166. flow_page → _executed166_executed

… 234 later steps

tests/test_wiki_web.py:81 · its file's page

What it checks (3)

  1. assert [b["id"] for b in blocks] == ["API", "Core"] observes _data via blocks
  2. assert all(0 <= a0 < a1 <= 2 * math.pi + 1e-9 for a0, a1 in spans) observes all
  3. assert all(spans[i][1] <= spans[i + 1][0] for i in range(len(spans) - 1)) observes all

Where the product reaches it

  • dossier → _rank_enum_over_mirror → _class_side_is_only_enum_mirrors → all (flow)

Call flow

test_every_block_is_a_wedge_and_wedges_do_not_overlap→_data→all

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_every_block_is_a_wedge_and_wedges_do_not_overlap · 3 checks_databuild_graphconnectREQ-DDB-QUERY-001 · measured_databuild_graph_linkstable_existsREQ-DDB-QUERY-003 · measured_databuild_graphREQ-DDB-WIKI-019 · measured_dataweb_data_index_requirementsREQ-DDB-WIKI-022 · measuredallREQ-DDB-WIKI-054 · inferred
Also reaches 5 requirements

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