Пример #1
0
    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])
Пример #2
0
    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])
Пример #3
0
 def setUp(self):
     LoggingTestHelper.setUp(self)
     self.handler = CollectingHandler()
     self.records = self.handler.records
     self.logger = logging.getLogger()
     self.logger.addHandler(self.handler)
Пример #4
0
 def setUp(self):
     if self.schema is None:
         ZopeStarterTestCase.schema = getSchema()
     LoggingTestHelper.setUp(self)