Example #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])
Example #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])
Example #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)
Example #4
0
 def setUp(self):
     if self.schema is None:
         ZopeStarterTestCase.schema = getSchema()
     LoggingTestHelper.setUp(self)