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

Method test_classname_instance

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

Source from the content-addressed store, hash-verified

516
517 @parametrize_families
518 def test_classname_instance(
519 self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
520 ) -> None:
521 pytester.makepyfile(
522 """
523 class TestClass(object):
524 def test_method(self):
525 assert 0
526 """
527 )
528 result, dom = run_and_parse(family=xunit_family)
529 assert result.ret
530 node = dom.get_first_by_tag("testsuite")
531 node.assert_attr(failures=1)
532 tnode = node.get_first_by_tag("testcase")
533 tnode.assert_attr(
534 classname="test_classname_instance.TestClass", name="test_method"
535 )
536
537 @parametrize_families
538 def test_classname_nested_dir(

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected