@@ -237,7 +237,7 @@ pytest.mark.xfail
237237
238238Marks a test function as *expected to fail *.
239239
240- .. py :function :: pytest.mark.xfail(condition = None , * , reason = None , raises = None , run = True , strict = False )
240+ .. py :function :: pytest.mark.xfail(condition = None , * , reason = None , raises = None , run = True , strict = xfail_strict )
241241
242242 :type condition: bool or str
243243 :param condition:
@@ -249,17 +249,19 @@ Marks a test function as *expected to fail*.
249249 :keyword Type[Exception] raises:
250250 Exception subclass (or tuple of subclasses) expected to be raised by the test function; other exceptions will fail the test.
251251 :keyword bool run:
252- If the test function should actually be executed. If ``False ``, the function will always xfail and will
252+ Whether the test function should actually be executed. If ``False ``, the function will always xfail and will
253253 not be executed (useful if a function is segfaulting).
254254 :keyword bool strict:
255- * If ``False `` (the default) the function will be shown in the terminal output as ``xfailed `` if it fails
255+ * If ``False `` the function will be shown in the terminal output as ``xfailed `` if it fails
256256 and as ``xpass `` if it passes. In both cases this will not cause the test suite to fail as a whole. This
257257 is particularly useful to mark *flaky * tests (tests that fail at random) to be tackled later.
258258 * If ``True ``, the function will be shown in the terminal output as ``xfailed `` if it fails, but if it
259259 unexpectedly passes then it will **fail ** the test suite. This is particularly useful to mark functions
260260 that are always failing and there should be a clear indication if they unexpectedly start to pass (for example
261261 a new release of a library fixes a known bug).
262262
263+ Defaults to :confval: `xfail_strict `, which is ``False `` by default.
264+
263265
264266Custom marks
265267~~~~~~~~~~~~
0 commit comments