Skip to content

Commit c926999

Browse files
authored
Merge pull request #4939 from smheidrich/mark_xfail_language
Minor grammar fixes in pytest.mark.xfail docs
2 parents b3eb5d1 + 519157c commit c926999

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/en/reference.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,18 @@ Marks a test function as *expected to fail*.
199199
.. py:function:: pytest.mark.xfail(condition=None, *, reason=None, raises=None, run=True, strict=False)
200200
201201
:type condition: bool or str
202-
:param condition: ``True/False`` if the condition should be marked as xfail or a :ref:`condition string <string conditions>`.
202+
:param condition:
203+
Condition for marking the test function as xfail (``True/False`` or a
204+
:ref:`condition string <string conditions>`).
203205
:keyword str reason: Reason why the test function is marked as xfail.
204206
:keyword Exception raises: Exception subclass expected to be raised by the test function; other exceptions will fail the test.
205207
:keyword bool run:
206208
If the test function should actually be executed. If ``False``, the function will always xfail and will
207-
not be executed (useful a function is segfaulting).
209+
not be executed (useful if a function is segfaulting).
208210
:keyword bool strict:
209211
* If ``False`` (the default) the function will be shown in the terminal output as ``xfailed`` if it fails
210212
and as ``xpass`` if it passes. In both cases this will not cause the test suite to fail as a whole. This
211-
is particularly useful to mark *flaky* tests (tests that random at fail) to be tackled later.
213+
is particularly useful to mark *flaky* tests (tests that fail at random) to be tackled later.
212214
* If ``True``, the function will be shown in the terminal output as ``xfailed`` if it fails, but if it
213215
unexpectedly passes then it will **fail** the test suite. This is particularly useful to mark functions
214216
that are always failing and there should be a clear indication if they unexpectedly start to pass (for example

0 commit comments

Comments
 (0)