[py-svn] r38577 - py/trunk/py/test/rsession/testing
fijal at codespeak.net
fijal at codespeak.net
Mon Feb 12 16:40:05 CET 2007
Author: fijal
Date: Mon Feb 12 16:40:04 2007
New Revision: 38577
Modified:
py/trunk/py/test/rsession/testing/test_executor.py
Log:
Test for explicit Failed
Modified: py/trunk/py/test/rsession/testing/test_executor.py
==============================================================================
--- py/trunk/py/test/rsession/testing/test_executor.py (original)
+++ py/trunk/py/test/rsession/testing/test_executor.py Mon Feb 12 16:40:04 2007
@@ -6,6 +6,7 @@
AsyncExecutor, ApigenExecutor
from py.__.test.rsession.outcome import ReprOutcome
from py.__.test.rsession.testing.basetest import BasicRsessionTest
+from py.__.test.outcome import Failed
def setup_module(mod):
if py.std.sys.platform == "win32":
@@ -32,6 +33,10 @@
def run(self):
print "hello"
+class ItemTestFailingExplicit(Item):
+ def run(self):
+ raise Failed(excinfo="3")
+
class TestExecutor(BasicRsessionTest):
def test_run_executor(self):
ex = RunExecutor(ItemTestPassing("pass", self.config), config=self.config)
@@ -145,3 +150,11 @@
assert out1.passed
assert out2.passed
assert not out3.passed
+
+ def test_executor_explicit_Failed(self):
+ ex = RunExecutor(ItemTestFailingExplicit("failex", self.config),
+ config=self.config)
+
+ outcome = ex.execute()
+ assert not outcome.passed
+ assert outcome.excinfo == "3"
More information about the py-svn
mailing list