Added unit tests for event registration, dispatching, and context infrastructure.
- EventRegistry.get_all() now deep-copies handler lists so callers cannot mutate internal state.
This commit is contained in:
@@ -138,7 +138,9 @@ class EventRegistry:
|
||||
|
||||
:return: Dict mapping event type values to handler lists.
|
||||
"""
|
||||
return self._handlers.copy()
|
||||
return {
|
||||
event_type: entries.copy() for event_type, entries in self._handlers.items()
|
||||
}
|
||||
|
||||
def get_handler_module(self, handler: EventHandler) -> str | None:
|
||||
"""
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user