(
self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
)
| 549 | |
| 550 | @parametrize_families |
| 551 | def test_internal_error( |
| 552 | self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str |
| 553 | ) -> None: |
| 554 | pytester.makeconftest("def pytest_runtest_protocol(): 0 / 0") |
| 555 | pytester.makepyfile("def test_function(): pass") |
| 556 | result, dom = run_and_parse(family=xunit_family) |
| 557 | assert result.ret |
| 558 | node = dom.get_first_by_tag("testsuite") |
| 559 | node.assert_attr(errors=1, tests=1) |
| 560 | tnode = node.get_first_by_tag("testcase") |
| 561 | tnode.assert_attr(classname="pytest", name="internal") |
| 562 | fnode = tnode.get_first_by_tag("error") |
| 563 | fnode.assert_attr(message="internal error") |
| 564 | assert "Division" in fnode.toxml() |
| 565 | |
| 566 | @pytest.mark.parametrize( |
| 567 | "junit_logging", ["no", "log", "system-out", "system-err", "out-err", "all"] |
nothing calls this directly
no test coverage detected