def tearDown(self): LoggingTestHelper.tearDown(self) shutil.rmtree(TEMPNAME) Products.__path__ = [d for d in Products.__path__ if os.path.exists(d)] # reset logger states for name in (None, 'access', 'trace'): logger = logging.getLogger(name) logger.__dict__.update(logger_states[name])
def tearDown(self): try: os.rmdir(TEMPPRODUCTS) os.rmdir(TEMPNAME) except: pass Products.__path__ = [d for d in Products.__path__ if os.path.exists(d)] LoggingTestHelper.tearDown(self) # reset logger states for name in (None, 'access', 'trace'): logger = logging.getLogger(name) logger.__dict__.update(logger_states[name])
def setUp(self): LoggingTestHelper.setUp(self) self.handler = CollectingHandler() self.records = self.handler.records self.logger = logging.getLogger() self.logger.addHandler(self.handler)
def setUp(self): if self.schema is None: ZopeStarterTestCase.schema = getSchema() LoggingTestHelper.setUp(self)