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

Method to_xml

src/_pytest/junitxml.py:149–155  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

147 self.attrs = temp_attrs
148
149 def to_xml(self) -> ET.Element:
150 testcase = ET.Element("testcase", self.attrs, time="%.3f" % self.duration)
151 properties = self.make_properties_node()
152 if properties is not None:
153 testcase.append(properties)
154 testcase.extend(self.nodes)
155 return testcase
156
157 def _add_simple(self, tag: str, message: str, data: Optional[str] = None) -> None:
158 node = ET.Element(tag, message=message)

Callers 2

finalizeMethod · 0.95
pytest_sessionfinishMethod · 0.80

Calls 2

make_properties_nodeMethod · 0.95
appendMethod · 0.80

Tested by

no test coverage detected