def tearDown(self): logger.setLevel(self.level) logger.removeHandler(self.handler) self.handler.reset()
def setUp(self): self.level = logger.getEffectiveLevel() logger.setLevel(logging.DEBUG) logger.addHandler(self.handler)