| 213 | self._add_simple("skipped", "collection skipped", str(report.longrepr)) |
| 214 | |
| 215 | def append_error(self, report: TestReport) -> None: |
| 216 | assert report.longrepr is not None |
| 217 | reprcrash: ReprFileLocation | None = getattr(report.longrepr, "reprcrash", None) |
| 218 | if reprcrash is not None: |
| 219 | reason = reprcrash.message |
| 220 | else: |
| 221 | reason = str(report.longrepr) |
| 222 | |
| 223 | if report.when == "teardown": |
| 224 | msg = f'failed on teardown with "{reason}"' |
| 225 | else: |
| 226 | msg = f'failed on setup with "{reason}"' |
| 227 | self._add_simple("error", bin_xml_escape(msg), str(report.longrepr)) |
| 228 | |
| 229 | def append_skipped(self, report: TestReport) -> None: |
| 230 | if hasattr(report, "wasxfail"): |