From f050203f5d1681fe0bc5052aa6cc3fed5affb3af Mon Sep 17 00:00:00 2001 From: Allan Lewis Date: Tue, 30 Apr 2019 17:29:28 +0100 Subject: [PATCH] Improve help for --runxfail flag The help for the '--runxfail' flag is somewhat misleading. The default behaviour is to run tests marked as 'xfail' but to ignore the results. This flag alters that behaviour by running these tests as if they weren't marked 'xfail', i.e. their results are not ignored. --- changelog/5188.doc.rst | 1 + src/_pytest/skipping.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog/5188.doc.rst diff --git a/changelog/5188.doc.rst b/changelog/5188.doc.rst new file mode 100644 index 000000000..726745638 --- /dev/null +++ b/changelog/5188.doc.rst @@ -0,0 +1 @@ +Improve help for ``--runxfail`` flag. diff --git a/src/_pytest/skipping.py b/src/_pytest/skipping.py index 22acafbdd..5525e1137 100644 --- a/src/_pytest/skipping.py +++ b/src/_pytest/skipping.py @@ -17,7 +17,7 @@ def pytest_addoption(parser): action="store_true", dest="runxfail", default=False, - help="run tests even if they are marked xfail", + help="report the results of xfail tests as if they were not marked", ) parser.addini(