test_invalid_declared_kind_fails_closed_rather_than_normalizing

Tests › tests/test_locks.py

passed Passed in the packaged run.

What this test is for

Why it exists

A typo'd `kind` REFUSES the build instead of normalizing to 'unknown'.

Given

  1. —
→

When

  1. load_lock_patterns({"locks": [{"name": "W", "kind": "bogus"}]})
  2. message = str(exc.value)
→

Then

  1. ✓ raises DeclarationError
  2. ✓ message contains "'W'"
  3. ✓ message contains "'bogus'"
  4. ✓ message contains "mutex, recursive_mutex, shared_mutex, semaphore, spinlock, interrupt_mask, unknown"

tests/test_locks.py:198 · its file's page

What it checks (3)

  1. assert "'W'" in message not attributed
  2. assert "'bogus'" in message not attributed
  3. assert ( "mutex, recursive_mutex, shared_mutex, semaphore, spinlock, interrupt_mask, unknown" in message ) not attributed

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_invalid_declared_kind_fails_closed_rather_than_normalizing→load_lock_patterns

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_invalid_declared_kind_fails_closed_rather_than_normalizing · 3 checksload_lock_patternsREQ-DDB-SCHEMA-011 · measuredload_lock_patternsdeclaration_originREQ-DDB-SCHEMA-012 · measured
Also reaches 2 requirements

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