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

Method test_xfailure_xpass

testing/test_junitxml.py:712–728  ·  view source on GitHub ↗
(
        self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
    )

Source from the content-addressed store, hash-verified

710
711 @parametrize_families
712 def test_xfailure_xpass(
713 self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
714 ) -> None:
715 pytester.makepyfile(
716 """
717 import pytest
718 @pytest.mark.xfail
719 def test_xpass():
720 pass
721 """
722 )
723 result, dom = run_and_parse(family=xunit_family)
724 # assert result.ret
725 node = dom.find_first_by_tag("testsuite")
726 node.assert_attr(skipped=0, tests=1)
727 tnode = node.find_first_by_tag("testcase")
728 tnode.assert_attr(classname="test_xfailure_xpass", name="test_xpass")
729
730 @parametrize_families
731 def test_xfailure_xpass_strict(

Callers

nothing calls this directly

Calls 4

run_and_parseFunction · 0.85
find_first_by_tagMethod · 0.80
assert_attrMethod · 0.80
makepyfileMethod · 0.45

Tested by

no test coverage detected