def test_cleanUpOnetimeEventObserver(self):

        d = EventDispatcher()
        cb = CallbackTracker()

        d.addOnetimeObserver('//event/test', cb.call)
        d.dispatch(None, '//event/test')
        self.assertEqual(1, cb.called)
        self.assertEqual(0, len(d._eventObservers.pop(0)))
Test observer clean-up after onetime named events.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/words/test/test_xishutil.py/EventDispatcherTest.test_cleanUpOnetimeEventObserver