def run(self, index): from tests.examples import unit sys.path.append(unit.__path__[0]) from tests.examples.unit import run_tests as unit_run reload(unit_run) # Reload to force a new Proboscis unit_run.run_tests()
def setUp(self): import proboscis import proboscis_example from proboscis import TestRegistry old_default_registry = proboscis.DEFAULT_REGISTRY proboscis.DEFAULT_REGISTRY = TestRegistry() compatability.reload(proboscis_example) self.registry = proboscis.DEFAULT_REGISTRY proboscis.default_registry = old_default_registry self.plan = self.registry.get_test_plan()
def setUp(self): import proboscis import proboscis_example from proboscis.case import TestPlan from proboscis import TestRegistry old_default_registry = proboscis.decorators.DEFAULT_REGISTRY proboscis.decorators.DEFAULT_REGISTRY = TestRegistry() compatability.reload(proboscis_example) self.registry = proboscis.decorators.DEFAULT_REGISTRY proboscis.default_registry = old_default_registry self.plan = TestPlan.create_from_registry(self.registry)
def setUp(self): import proboscis from tests.unit import proboscis_example from proboscis.case import TestPlan from proboscis import TestRegistry old_default_registry = proboscis.decorators.DEFAULT_REGISTRY proboscis.decorators.DEFAULT_REGISTRY = TestRegistry() compatability.reload(proboscis_example) self.registry = proboscis.decorators.DEFAULT_REGISTRY proboscis.default_registry = old_default_registry self.plan = TestPlan.create_from_registry(self.registry)
def reload_proboscis(): """ Reloading Proboscis like this causes problems- for instance, exceptions aren't caught because the exception to be caught is a an earlier version of the reloaded doppleganger that is thrown. """ reload(proboscis) def new_cap_ex(body_func, except_type): e = capture_exception(body_func, Exception) if e: if (str(type(e)) == str(except_type)): return e raise e return None proboscis.compatability.capture_exception = new_cap_ex
def run(self, index): from examples import unit sys.path.append(unit.__path__[0]) from examples.unit import run_tests as unit_run reload(unit_run) # Reload to force a new Proboscis unit_run.run_tests()