pytest_xfail plugin

mark python test functions as expected-to-fail and report them separately.

usage

Use the generic mark decorator to mark your test functions as 'expected to fail':

@py.test.mark.xfail
def test_hello():
    ...

This test will be executed but no traceback will be reported when it fails. Instead terminal reporting will list it in the "expected to fail" section or "unexpectedly passing" section.

Start improving this plugin in 30 seconds

  1. Download pytest_xfail.py plugin source code
  2. put it somewhere as pytest_xfail.py into your import path
  3. a subsequent py.test run will use your local version

Checkout customize, other plugins or get in contact.