MCPcopy Create free account
hub / github.com/ipython/ipython / test_cb_error

Method test_cb_error

IPython/core/tests/test_events.py:47–51  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

45 self.em.unregister('ping_received', cb1)
46
47 def test_cb_error(self):
48 cb = Mock(side_effect=ValueError)
49 self.em.register('ping_received', cb)
50 with tt.AssertPrints("Error in callback"):
51 self.em.trigger('ping_received')
52
53 def test_cb_keyboard_interrupt(self):
54 cb = Mock(side_effect=KeyboardInterrupt)

Callers

nothing calls this directly

Calls 2

triggerMethod · 0.80
registerMethod · 0.45

Tested by

no test coverage detected