MCPcopy
hub / github.com/pytest-dev/pytest / test_internal_error

Method test_internal_error

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

Source from the content-addressed store, hash-verified

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"]

Callers

nothing calls this directly

Calls 6

run_and_parseFunction · 0.85
get_first_by_tagMethod · 0.80
assert_attrMethod · 0.80
toxmlMethod · 0.80
makeconftestMethod · 0.45
makepyfileMethod · 0.45

Tested by

no test coverage detected