def runtraced(self, colitem): |
if self.shouldclose(): |
raise Exit, "received external close signal" |
|
outcome = None |
-> colitem.startcapture() |
try: |
self.start(colitem) |
try: |
try: |
if colitem._stickyfailure: |
raise colitem._stickyfailure |
outcome = self.run(colitem) |
except (KeyboardInterrupt, Exit): |
raise |
except Outcome, outcome: |
if outcome.excinfo is None: |
outcome.excinfo = py.code.ExceptionInfo() |
except: |
excinfo = py.code.ExceptionInfo() |
outcome = Failed(excinfo=excinfo) |
assert (outcome is None or |
isinstance(outcome, (list, Outcome))) |
finally: |
self.finish(colitem, outcome) |
if isinstance(outcome, Failed) and self.config.option.exitfirst: |
py.test.exit("exit on first problem configured.", item=colitem) |
finally: |
colitem.finishcapture() |