def tearDown(self): # pylint: disable=W0404 # Prevent processing of pending events after the test has finished: wx.GetApp().Disconnect(wx.ID_ANY) from taskcoachlib import patterns patterns.Publisher().clear() patterns.CommandHistory().clear() patterns.NumberedInstances.count = dict() from taskcoachlib.domain import date date.Scheduler().shutdown(False, False) date.Scheduler.deleteInstance() if hasattr(self, 'events'): del self.events from taskcoachlib.thirdparty.pubsub import pub pub.unsubAll() super(TestCase, self).tearDown()
def tearDown(self): # pylint: disable=W0404 # Prevent processing of pending events after the test has finished: wx.GetApp().Disconnect(wx.ID_ANY) from taskcoachlib import patterns patterns.Publisher().clear() patterns.CommandHistory().clear() patterns.NumberedInstances.count = dict() from taskcoachlib.domain import date date.Scheduler().shutdown() date.Scheduler.deleteInstance() if hasattr(self, 'events'): del self.events from taskcoachlib.thirdparty.pubsub import pub pub.unsubAll() super(TestCase, self).tearDown()
def removeInstance(self): for observer in self.__observers.copy(): self.removeObserver(observer) pub.unsubAll(listenerFilter=lambda listener: hasattr(listener.getCallable(), 'im_self') and \ listener.getCallable().im_self is self)
def removeInstance(self): for observer in self.__observers.copy(): self.removeObserver(observer) pub.unsubAll(listenerFilter=lambda listener: hasattr(listener.getCallable(), 'im_self') and \ listener.getCallable().im_self is self)