Use False, instead of None as default for _XfailMarkDecorator's condition param and update doc (#11600)

This commit is contained in:
Avasam
2023-11-17 03:42:05 -05:00
committed by GitHub
parent 223e030604
commit 80442ae2f2
4 changed files with 6 additions and 5 deletions

View File

@@ -239,12 +239,11 @@ pytest.mark.xfail
Marks a test function as *expected to fail*.
.. py:function:: pytest.mark.xfail(condition=None, *, reason=None, raises=None, run=True, strict=xfail_strict)
.. py:function:: pytest.mark.xfail(condition=False, *, reason=None, raises=None, run=True, strict=xfail_strict)
:type condition: bool or str
:param condition:
:keyword Union[bool, str] condition:
Condition for marking the test function as xfail (``True/False`` or a
:ref:`condition string <string conditions>`). If a bool, you also have
:ref:`condition string <string conditions>`). If a ``bool``, you also have
to specify ``reason`` (see :ref:`condition string <string conditions>`).
:keyword str reason:
Reason why the test function is marked as xfail.