class PluginTester(TestCase): @classmethod def setUpClass(cls): cls.core = Core() name = "%s.%s" % (cls.__module__, cls.__name__) for f in glob(join(name, "debug_*")): remove(f) # Copy debug report to attachment dir for jenkins @classmethod def tearDownClass(cls): name = "%s.%s" % (cls.__module__, cls.__name__) if not exists(name): makedirs(name) for f in glob("debug_*"): move(f, join(name, f)) def setUp(self): self.thread = Thread(self.core) exc_clear() def tearDown(self): exc = exc_info() if exc != (None, None, None): debug = self.thread.writeDebugReport() log(DEBUG, debug)
def setUp(self): self.thread = Thread(self.core) exc_clear()