Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
    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()
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
    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)
Ejemplo n.º 5
0
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
Ejemplo n.º 6
0
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
Ejemplo n.º 7
0
 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()