(
self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
)
| 638 | |
| 639 | @parametrize_families |
| 640 | def test_xfailure_function( |
| 641 | self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str |
| 642 | ) -> None: |
| 643 | pytester.makepyfile( |
| 644 | """ |
| 645 | import pytest |
| 646 | def test_xfail(): |
| 647 | pytest.xfail("42") |
| 648 | """ |
| 649 | ) |
| 650 | result, dom = run_and_parse(family=xunit_family) |
| 651 | assert not result.ret |
| 652 | node = dom.find_first_by_tag("testsuite") |
| 653 | node.assert_attr(skipped=1, tests=1) |
| 654 | tnode = node.find_first_by_tag("testcase") |
| 655 | tnode.assert_attr(classname="test_xfailure_function", name="test_xfail") |
| 656 | fnode = tnode.find_first_by_tag("skipped") |
| 657 | fnode.assert_attr(type="pytest.xfail", message="42") |
| 658 | |
| 659 | @parametrize_families |
| 660 | def test_xfailure_marker( |
nothing calls this directly
no test coverage detected