[py-svn] py-trunk commit e943e7b50b7d: adding xfail example

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue May 25 16:56:34 CEST 2010


# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview
# User holger krekel <holger at merlinux.eu>
# Date 1274541751 -7200
# Node ID e943e7b50b7d4c6aa21f6fc341b7dc6801c696b9
# Parent  c3f32c3ed8a4f63b58711cbe9e696034b90160e7
adding xfail example

--- /dev/null
+++ b/doc/example/xfail_demo.py
@@ -0,0 +1,16 @@
+import py
+
+ at py.test.mark.xfail
+def test_hello():
+    assert 0
+
+ at py.test.mark.xfail(run=False)
+def test_hello2():
+    assert 0
+
+ at py.test.mark.xfail("hasattr(os, 'sep')")
+def test_hello3():
+    assert 0
+
+def test_hello5():
+    py.test.xfail("reason")



More information about the pytest-commit mailing list