update docs: mention that py.test.xfail is there

--HG--
branch : trunk
This commit is contained in:
holger krekel 2010-05-21 18:16:16 +02:00
parent 4f7ef0b63f
commit 7cba3a07af
1 changed files with 11 additions and 0 deletions

View File

@ -106,6 +106,17 @@ To specify an explicit reason to be shown with xfailure detail::
@py.test.mark.xfail(..., reason="my reason")
imperative xfail from within a test or setup function
------------------------------------------------------
If you cannot declare xfail-conditions at import time
you can also imperatively produce an XFail-outcome from
within test or setup code. Example::
def test_function():
if not valid_config():
py.test.xfail("unsuppored configuration")
skipping on a missing import dependency
--------------------------------------------------