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

Method test_classname_nested_dir

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

Source from the content-addressed store, hash-verified

467
468 @parametrize_families
469 def test_classname_nested_dir(
470 self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
471 ) -> None:
472 p = pytester.mkdir("sub").joinpath("test_hello.py")
473 p.write_text("def test_func(): 0/0")
474 result, dom = run_and_parse(family=xunit_family)
475 assert result.ret
476 node = dom.find_first_by_tag("testsuite")
477 node.assert_attr(failures=1)
478 tnode = node.find_first_by_tag("testcase")
479 tnode.assert_attr(classname="sub.test_hello", name="test_func")
480
481 @parametrize_families
482 def test_internal_error(

Callers

nothing calls this directly

Calls 4

run_and_parseFunction · 0.85
find_first_by_tagMethod · 0.80
assert_attrMethod · 0.80
mkdirMethod · 0.45

Tested by

no test coverage detected