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

Method test_failure_verbose_message

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

Source from the content-addressed store, hash-verified

567
568 @parametrize_families
569 def test_failure_verbose_message(
570 self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
571 ) -> None:
572 pytester.makepyfile(
573 """
574 import sys
575 def test_fail():
576 assert 0, "An error"
577 """
578 )
579 result, dom = run_and_parse(family=xunit_family)
580 node = dom.find_first_by_tag("testsuite")
581 tnode = node.find_first_by_tag("testcase")
582 fnode = tnode.find_first_by_tag("failure")
583 fnode.assert_attr(message="AssertionError: An error\nassert 0")
584
585 @parametrize_families
586 def test_failure_escape(

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