test_invalid_declared_role_fails_closed

Tests › tests/test_locks.py

passed Passed in the packaged run.

What this test is for

Why it exists

`role` was the ONE declared lock enum with no guard at all: it rode raw into the INSERT and tripped `CHECK(role IN (...))` as a bare IntegrityError mid-build, naming neither the pattern nor the file. It now refuses at load time like its three siblings.

Given

  1. —
→

When

  1. load_lock_patterns({"locks": [{"name": "W", "role": "lock"}]})
→

Then

  1. ✓ raises DeclarationError
  2. ✓ str(exc.value) contains "'lock'"
  3. ✓ str(exc.value) contains "acquire, try_acquire, scoped"

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

What it checks (2)

  1. assert "'lock'" in str(exc.value) not attributed
  2. assert "acquire, try_acquire, scoped" in str(exc.value) 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_role_fails_closed→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_role_fails_closed · 2 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.