test_invalid_declared_form_and_mode_fail_closed_instead_of_coercing

Tests › tests/test_locks.py

passed Passed in the packaged run.

What this test is for

Why it exists

`form` and `mode` used to coerce anything that was not the exact non-default spelling INTO the default: `form: "cal"` silently became an RAII guard and `mode: "shard"` an exclusive hold. Both are specific, real synchronization claims invented from a typo, so both now refuse.

Given

  1. —
→

When

  1. load_lock_patterns({"locks": [{"name": "W", "form": "cal"}]})
  2. load_lock_patterns({"locks": [{"name": "W", "mode": "shard"}]})
→

Then

  1. ✓ raises DeclarationError
  2. ✓ raises DeclarationError

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

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_form_and_mode_fail_closed_instead_of_coercing→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_form_and_mode_fail_closed_instead_of_coercingload_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.