def test_observerRaisingException(self):

        class OrderedCallbackList(utility.CallbackList):
            def __init__(self):
                self.callbacks = OrderedDict()

        class TestError(Exception):
            pass

        def raiseError(_):
            raise TestError()

        d = EventDispatcher()
        cb = CallbackTracker()

        originalCallbackList = utility.CallbackList

        try:
            utility.CallbackList = OrderedCallbackList

            d.addObserver('//event/test', raiseError)
            d.addObserver('//event/test', cb.call)
            try:
                d.dispatch(None, '//event/test')
            except TestError:
                self.fail("TestError raised. Should have been logged instead.")

            self.assertEqual(1, len(self.flushLoggedErrors(TestError)))
            self.assertEqual(1, cb.called)
        finally:
            utility.CallbackList = originalCallbackList
Find and return the scroll widget child for this widget.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/words/test/test_xishutil.py/EventDispatcherTest.test_observerRaisingException--crossover with--dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/qt/qt_scroll_area.py/QtScrollArea.scroll_widget