(
self,
testcase: "unittest.TestCase",
reason: Optional["twisted.trial.unittest.Todo"] = None,
)
| 270 | self._addexcinfo(sys.exc_info()) |
| 271 | |
| 272 | def addUnexpectedSuccess( |
| 273 | self, |
| 274 | testcase: "unittest.TestCase", |
| 275 | reason: Optional["twisted.trial.unittest.Todo"] = None, |
| 276 | ) -> None: |
| 277 | msg = "Unexpected success" |
| 278 | if reason: |
| 279 | msg += f": {reason.reason}" |
| 280 | # Preserve unittest behaviour - fail the test. Explicitly not an XPASS. |
| 281 | try: |
| 282 | fail(msg, pytrace=False) |
| 283 | except fail.Exception: |
| 284 | self._addexcinfo(sys.exc_info()) |
| 285 | |
| 286 | def addSuccess(self, testcase: "unittest.TestCase") -> None: |
| 287 | pass |
nothing calls this directly
no test coverage detected