def test_critical_debugging_flag(): outcome = Outcome(is_critical=True) r = ReprOutcome(outcome.make_repr()) assert r.is_critical
except: e = sys.exc_info()[1] if isinstance(e, Failed) and e.excinfo: excinfo = e.excinfo else: excinfo = py.code.ExceptionInfo() if isinstance(self.item, py.test.collect.Function): fun = self.item.obj # hope this is stable code = py.code.Code(fun) excinfo.traceback = excinfo.traceback.cut( path=code.path, firstlineno=code.firstlineno) outcome = Outcome(excinfo=excinfo, setupfailure=False) if self.usepdb: if self.reporter is not None: self.reporter(repevent.ImmediateFailure(self.item, ReprOutcome(outcome.make_repr (self.config.option.tbstyle)))) import pdb pdb.post_mortem(excinfo._excinfo[2]) # XXX hmm, we probably will not like to continue from that # point raise SystemExit() outcome.stdout, outcome.stderr = self.item._getouterr() return outcome class ApigenExecutor(RunExecutor): """ Same as RunExecutor, but takes tracer to trace calls as an argument to execute """ def execute(self, tracer): self.tracer = tracer return super(ApigenExecutor, self).execute()