diff --git a/IPython/core/events.py b/IPython/core/events.py index a4c818b..90ff8f7 100644 --- a/IPython/core/events.py +++ b/IPython/core/events.py @@ -89,9 +89,8 @@ class EventManager(object): available_events = {} def _define_event(callback_function): - callback_proto = callback_prototype(callback_function) - available_events[callback_function.__name__] = callback_proto - return callback_proto + available_events[callback_function.__name__] = callback_function + return callback_function # ------------------------------------------------------------------------------ # Callback prototypes diff --git a/IPython/core/tests/test_events.py b/IPython/core/tests/test_events.py index cc9bf40..61bc01d 100644 --- a/IPython/core/tests/test_events.py +++ b/IPython/core/tests/test_events.py @@ -76,16 +76,3 @@ class CallbackTests(unittest.TestCase): self.em.trigger('ping_received') self.assertEqual([True, True, False], invoked) self.assertEqual([func3], self.em.callbacks['ping_received']) - - def test_ignore_event_arguments_if_no_argument_required(self): - call_count = [0] - def event_with_no_argument(): - call_count[0] += 1 - - self.em.register('event_with_argument', event_with_no_argument) - self.em.trigger('event_with_argument', 'the argument') - self.assertEqual(call_count[0], 1) - - self.em.unregister('event_with_argument', event_with_no_argument) - self.em.trigger('ping_received') - self.assertEqual(call_count[0], 1)