test_a_macro_reports_its_expansion_parameters_and_site

Tests › tests/test_macro_query.py

passed Passed in the packaged run.

What this test is for

Why it exists

A macro's expansion and location are reachable by name.

Given

  1. defs = macro_definitions(macro_db, "WRAP")
→

When

  1. —
→

Then

  1. ✓ len(defs) equals 1
  2. ✓ defs[0].expansion equals "hidden_##member"
  3. ✓ defs[0].params equals "(member)"
  4. ✓ (defs[0].file, defs[0].line) equals ("include/private_access.h", 15)

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 · 15 of 226 steps

… 17 earlier steps

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pydossier18. _documentation_mentions → table_exists18table_exists19. _documentation_mentions → has_columns19has_columns20. has_columns → table_exists20table_exists21–22. _hint_from → _name_exists21_name_exists +1 more

… 33 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.pyother filesother filesother filesother filesloop (line 515)loopdossier56. _flatten_subject → _gate_definitions56_gate_definitions57. _gate_definitions → macro_definitions57macro_definitions58. macro_definitions → connect58connect▶ test enters59. macro_definitions → macro_definitions_conn59macro_definitions_conn60. macro_definitions_conn → has_columns60has_columns61–62. macro_definitions_conn → _macro_def61_macro_def +1 more63. gates_covering → table_exists63table_exists64. gates_covering → has_columns64has_columns65. gates_covering → _gate_columns65_gate_columns

… 6 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.pyother filesother filesother filesother filesdossier72. decided_default → is_shipped_config72is_shipped_config73. _with_defaults → _in_default_build73_in_default_build74. _macro_def → _macro_params74_macro_params75. _macro_params → table_exists75table_exists76. _macro_def → strip_xml76strip_xml77. _macro_def → _referenced_by77_referenced_by78. _referenced_by → table_exists78table_exists79. _macro_def → symbol_provenance79symbol_provenance80–81. symbol_provenance → records_provenance80records_provenance +1 more82. _gate_definitions → _gate_definition_gaps82_gate_definition_gaps83. _flatten_subject → _empty_callers_note83_empty_callers_note

… 143 later steps

2 more

tests/test_macro_query.py:174 · its file's page

What it checks (4)

  1. assert len(defs) == 1 not attributed
  2. assert defs[0].expansion == "hidden_##member" not attributed
  3. assert defs[0].params == "(member)" not attributed
  4. assert (defs[0].file, defs[0].line) == ("include/private_access.h", 15) not attributed

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.