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

Method __call__

testing/test_junitxml.py:40–51  ·  view source on GitHub ↗
(
        self, *args: Union[str, "os.PathLike[str]"], family: Optional[str] = "xunit1"
    )

Source from the content-addressed store, hash-verified

38 self.schema = schema
39
40 def __call__(
41 self, *args: Union[str, "os.PathLike[str]"], family: Optional[str] = "xunit1"
42 ) -> Tuple[RunResult, "DomNode"]:
43 if family:
44 args = ("-o", "junit_family=" + family) + args
45 xml_path = self.pytester.path.joinpath("junit.xml")
46 result = self.pytester.runpytest("--junitxml=%s" % xml_path, *args)
47 if family == "xunit2":
48 with xml_path.open() as f:
49 self.schema.validate(f)
50 xmldoc = minidom.parse(str(xml_path))
51 return result, DomNode(xmldoc)
52
53
54@pytest.fixture

Callers

nothing calls this directly

Calls 3

DomNodeClass · 0.85
runpytestMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected