MCPcopy Index your code
hub / github.com/ipython/ipython / test_cb_error

Method test_cb_error

tests/test_events.py:50–54  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

triggerMethod · 0.80
registerMethod · 0.45

Tested by

no test coverage detected