Skip to content

Fix test_undefined_slot_raises: only swallow missing-parent-class errors#26

Merged
Sulstice merged 1 commit into
mainfrom
claude/schema-registry-meta-model-2upt56
Jul 24, 2026
Merged

Fix test_undefined_slot_raises: only swallow missing-parent-class errors#26
Sulstice merged 1 commit into
mainfrom
claude/schema-registry-meta-model-2upt56

Conversation

@Sulstice

Copy link
Copy Markdown
Collaborator

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.

Claude-Session: https://claude.ai/code/session_01EXeTeJsXisxTRXay6EoBSQ

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_01EXeTeJsXisxTRXay6EoBSQ
@Sulstice
Sulstice merged commit d447e84 into main Jul 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants