(self)
| 254 | self.write_captured_output(report) |
| 255 | |
| 256 | def finalize(self) -> None: |
| 257 | data = self.to_xml() |
| 258 | self.__dict__.clear() |
| 259 | # Type ignored because mypy doesn't like overriding a method. |
| 260 | # Also the return value doesn't match... |
| 261 | self.to_xml = lambda: data # type: ignore[assignment] |
| 262 | |
| 263 | |
| 264 | def _warn_incompatibility_with_xunit2( |