[py-svn] r31457 - py/branch/distributed/py/test/rsession/testing
hpk at codespeak.net
hpk at codespeak.net
Tue Aug 22 11:47:46 CEST 2006
Author: hpk
Date: Tue Aug 22 11:47:42 2006
New Revision: 31457
Added:
py/branch/distributed/py/test/rsession/testing/__init__.py (contents, props changed)
py/branch/distributed/py/test/rsession/testing/example1.py (contents, props changed)
py/branch/distributed/py/test/rsession/testing/test_executor.py (contents, props changed)
Log:
intermediate
Added: py/branch/distributed/py/test/rsession/testing/__init__.py
==============================================================================
--- (empty file)
+++ py/branch/distributed/py/test/rsession/testing/__init__.py Tue Aug 22 11:47:42 2006
@@ -0,0 +1 @@
+#
Added: py/branch/distributed/py/test/rsession/testing/example1.py
==============================================================================
--- (empty file)
+++ py/branch/distributed/py/test/rsession/testing/example1.py Tue Aug 22 11:47:42 2006
@@ -0,0 +1,13 @@
+
+
+def f1():
+ f2()
+
+def f2():
+ pass
+
+def g1():
+ g2()
+
+def g2():
+ assert ValueError
Added: py/branch/distributed/py/test/rsession/testing/test_executor.py
==============================================================================
--- (empty file)
+++ py/branch/distributed/py/test/rsession/testing/test_executor.py Tue Aug 22 11:47:42 2006
@@ -0,0 +1,16 @@
+
+import py
+import example1
+
+from py.__.test.rsession.executor import Executor
+
+def test_executor_passing_function():
+ ex = Executor(example1.f1)
+ outcome = ex.execute()
+ assert outcome.haspassed()
+
+def test_executor_raising_function():
+ ex = Executor(example1.g1)
+ outcome = ex.execute()
+ assert not outcome.haspassed()
+ excinfo = outcome.getexcinfo()
More information about the pytest-commit
mailing list