[py-svn] r38113 - py/trunk/py/test/rsession
fijal at codespeak.net
fijal at codespeak.net
Wed Feb 7 21:04:09 CET 2007
Author: fijal
Date: Wed Feb 7 21:04:01 2007
New Revision: 38113
Modified:
py/trunk/py/test/rsession/executor.py
Log:
Make fatal() attribute which makes boxed tests catch SystemExit, while
in-process let it slide.
Modified: py/trunk/py/test/rsession/executor.py
==============================================================================
--- py/trunk/py/test/rsession/executor.py (original)
+++ py/trunk/py/test/rsession/executor.py Wed Feb 7 21:04:01 2007
@@ -22,6 +22,9 @@
def run(self):
self.item.run()
+
+ def fatals(self):
+ return (SystemExit, KeyboardInterrupt)
def execute(self):
try:
@@ -29,6 +32,8 @@
outcome = Outcome()
except Skipped, e:
outcome = Outcome(skipped=str(e))
+ except self.fatals():
+ raise
except:
excinfo = py.code.ExceptionInfo()
if isinstance(self.item, py.test.Function):
@@ -78,7 +83,10 @@
""" Same as RunExecutor, but boxes test instead
"""
wraps = True
-
+
+ def fatals(self):
+ return None
+
def execute(self):
def fun():
outcome = RunExecutor.execute(self)
@@ -100,6 +108,9 @@
computations (more async mode)
"""
wraps = True
+
+ def fatals(self):
+ return None
def execute(self):
def fun():
More information about the py-svn
mailing list