def setUp(self): self.context = open_dependency_context(supply_logging=True) self.context.inject_as_class(os.makedirs, lambda *args, **kwargs: None) self.context.inject(open, fake_open) enable_default_reporters() EventBroker.reset() active_reporters_at_suite_start = [] def run_suite(): class Suite(TestSuite): def setup_suite(slf): for reporter in (ArtifactSaver, ResultCompiler, JunitReporter): if is_active(reporter): active_reporters_at_suite_start.append(reporter) run_suite() self.active = active_reporters_at_suite_start
def tearDown(self): enable_default_reporters() self.context.close()
def setUp(self): close_all_dependency_contexts() EventBroker.reset() enable_default_reporters() # The import below should cause the default reporters to be activated imp.reload(questions_three.scaffolds.test_script)
def tearDown(self): EventBroker.reset() enable_default_reporters() self.context.close()