From 570a5183e89b318bccdfc78658269abe7ebb1cba Mon Sep 17 00:00:00 2001 From: Joosboy <219508079+Joosboy@users.noreply.github.com> Date: Sun, 19 Jul 2026 13:54:59 +0530 Subject: [PATCH] DOC: fix pytest.mark.xfail and pytest.mark.skip reference docs (#10094) --- doc/en/reference/reference.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/en/reference/reference.rst b/doc/en/reference/reference.rst index 644b78668a7..33397ab120d 100644 --- a/doc/en/reference/reference.rst +++ b/doc/en/reference/reference.rst @@ -214,7 +214,7 @@ pytest.mark.skip Unconditionally skip a test function. -.. py:function:: pytest.mark.skip(reason=None) +.. py:function:: pytest.mark.skip(reason="unconditional skip") :keyword str reason: Reason why the test function is being skipped. @@ -266,7 +266,7 @@ pytest.mark.xfail Marks a test function as *expected to fail*. -.. py:function:: pytest.mark.xfail(condition=False, *, reason=None, raises=None, run=True, strict=strict_xfail) +.. py:function:: pytest.mark.xfail(condition=None, *, reason=None, raises=None, run=True, strict=strict_xfail) :keyword Union[bool, str] condition: Condition for marking the test function as xfail (``True/False`` or a @@ -277,7 +277,7 @@ Marks a test function as *expected to fail*. :keyword raises: Exception class (or tuple of classes) expected to be raised by the test function; other exceptions will fail the test. Note that subclasses of the classes passed will also result in a match (similar to how the ``except`` statement works). - :type raises: Type[:py:exc:`Exception`] + :type raises: Type[:py:exc:`Exception`] | Tuple[Type[:py:exc:`Exception`], ...] | None :keyword bool run: Whether the test function should actually be executed. If ``False``, the function will always xfail and will