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

Method test_classname_instance

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

Source from the content-addressed store, hash-verified

447
448 @parametrize_families
449 def test_classname_instance(
450 self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
451 ) -> None:
452 pytester.makepyfile(
453 """
454 class TestClass(object):
455 def test_method(self):
456 assert 0
457 """
458 )
459 result, dom = run_and_parse(family=xunit_family)
460 assert result.ret
461 node = dom.find_first_by_tag("testsuite")
462 node.assert_attr(failures=1)
463 tnode = node.find_first_by_tag("testcase")
464 tnode.assert_attr(
465 classname="test_classname_instance.TestClass", name="test_method"
466 )
467
468 @parametrize_families
469 def test_classname_nested_dir(

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