Commit 20123a8
committed
Fix test_undefined_slot_raises: only swallow missing-parent-class errors
The broad except (ValueError, KeyError) from the NWB Container fix was
also catching "No such slot: X" errors, causing test_undefined_slot_raises
to stop raising as expected.
Now re-raises any error whose message does not contain "No such class" —
which covers missing slot references, invalid ranges, etc. Only errors
from is_a pointing to a class outside the submitted schema (e.g. NWB's
NWBContainer → Container) are silently tolerated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EXeTeJsXisxTRXay6EoBSQ1 parent 6b40c7b commit 20123a8
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
257 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
258 | 262 | | |
259 | 263 | | |
260 | 264 | | |
| |||
0 commit comments