MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_xfail

Method test_xfail

testing/test_skipping.py:1288–1304  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

1286 )
1287
1288 def test_xfail(self, pytester: Pytester) -> None:
1289 pytester.makepyfile(
1290 """
1291 import pytest
1292 @pytest.mark.xfail(True, reason="True123")
1293 def test_func():
1294 assert 0
1295 """
1296 )
1297 result = pytester.runpytest("-rxs")
1298 result.stdout.fnmatch_lines(
1299 """
1300 *XFAIL*
1301 *True123*
1302 *1 xfail*
1303 """
1304 )
1305
1306
1307def test_xfail_item(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected