JUnit XML: Escape error messages in setup/teardown (#10190)

Co-authored-by: Holesch, Simon (BSH) <simon.holesch@bshg.com>
This commit is contained in:
holesch
2022-08-12 11:11:03 +02:00
committed by GitHub
parent 433efaeaa9
commit cc0092b9d8
4 changed files with 25 additions and 1 deletions

View File

@@ -231,7 +231,7 @@ class _NodeReporter:
msg = f'failed on teardown with "{reason}"'
else:
msg = f'failed on setup with "{reason}"'
self._add_simple("error", msg, str(report.longrepr))
self._add_simple("error", bin_xml_escape(msg), str(report.longrepr))
def append_skipped(self, report: TestReport) -> None:
if hasattr(report, "wasxfail"):