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

Method to_xml

src/_pytest/junitxml.py:144–150  ·  src/_pytest/junitxml.py::_NodeReporter.to_xml
(self)

Source from the content-addressed store, hash-verified

142 self.attrs = temp_attrs
143
144 def to_xml(self) -> ET.Element:
145 testcase = ET.Element(class="st">"testcase", self.attrs, time=fclass="st">"{self.duration:.3f}")
146 properties = self.make_properties_node()
147 if properties is not None:
148 testcase.append(properties)
149 testcase.extend(self.nodes)
150 return testcase
151
152 def _add_simple(self, tag: str, message: str, data: str | None = None) -> None:
153 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