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

Method test_xfail_xpass

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

Source from the content-addressed store, hash-verified

466 )
467
468 def test_xfail_xpass(self, pytester: Pytester) -> None:
469 p = pytester.makepyfile(
470 test_one="""
471 import pytest
472 @pytest.mark.xfail
473 def test_that():
474 assert 1
475 """
476 )
477 result = pytester.runpytest(p, "-rX")
478 result.stdout.fnmatch_lines(["*XPASS*test_that*", "*1 xpassed*"])
479 assert result.ret == 0
480
481 def test_xfail_imperative(self, pytester: Pytester) -> None:
482 p = pytester.makepyfile(

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected