test_a_naming_guess_is_labelled_differently_from_a_declared_interrupt

Tests › tests/test_isr.py

passed Passed in the packaged run.

What this test is for

Why it exists

`__attribute__((interrupt))` and `ISR_DIRECT_DECLARE(x)` are what the SOURCE SAYS; a name ending in _IRQHandler is what the index INFERRED. Both are worth recording and they are not the same evidence, so they are not written under the same `threads.source`.

Given

  1. found = {site[ENTRY]: site for site in _sites(_DEFINITIONS)}
  2. registered = {site[ENTRY]: site for site in _sites(_REGISTRATIONS)}
→

When

  1. —
→

Then

  1. ✓ found["tim0_handler"][SOURCE] equals "ast_isr_decl"
  2. ✓ found["uarte_isr"][SOURCE] equals "ast_isr_decl"
  3. ✓ found["TIM1_IRQHandler"][SOURCE] equals "ast_isr_name"
  4. ✓ registered["timer_isr"][SOURCE] equals "ast_spawn"

tests/test_isr.py:225 · its file's page

What it checks (4)

  1. assert found["tim0_handler"][SOURCE] == "ast_isr_decl", ( f"an interrupt attribute is declared, not guessed; got {found['tim0_handler'][SOURCE]!r}" ) observes _sites via found
  2. assert found["uarte_isr"][SOURCE] == "ast_isr_decl", ( f"a handler-declaring macro is declared; got {found['uarte_isr'][SOURCE]!r}" ) observes _sites via found
  3. assert found["TIM1_IRQHandler"][SOURCE] == "ast_isr_name", ( f"a naming convention is an inference; got {found['TIM1_IRQHandler'][SOURCE]!r}" ) observes _sites via found
  4. assert registered["timer_isr"][SOURCE] == "ast_spawn", ( f"a registration call is the existing source; got {registered['timer_isr'][SOURCE]!r}" ) observes _sites via registered

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_a_naming_guess_is_labelled_differently_from_a_declared_interrupt→_sites

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_a_naming_guess_is_labelled_differently_from_a_declared_interrupt · 4 checks_sites_walk_spawn_sitesis_python_treeREQ-DDB-PIPE-003 · measured_sitesload_thread_patternsREQ-DDB-SCHEMA-001 · measured_sitesload_thread_patternsdeclaration_originREQ-DDB-SCHEMA-012 · inferred
Also reaches 3 requirements

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