MCPcopy Create free account
hub / github.com/alphagov/notifications-api / __exit__

Method __exit__

tests/utils.py:29–33  ·  view source on GitHub ↗
(self, exc_type, exc_val, exc_tb)

Source from the content-addressed store, hash-verified

27 return self
28
29 def __exit__(self, exc_type, exc_val, exc_tb):
30 # Remove all listeners
31 for engine, listener in self._listeners:
32 event.remove(engine, "before_cursor_execute", listener)
33 self._listeners.clear()
34
35 def _listener(self, bind_key):
36 """Create a listener function that captures the bind_key in its closure."""

Callers

nothing calls this directly

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected