(self, rawexcinfo: _SysExcInfoType)
| 263 | pass |
| 264 | |
| 265 | def _addexcinfo(self, rawexcinfo: _SysExcInfoType) -> None: |
| 266 | rawexcinfo = _handle_twisted_exc_info(rawexcinfo) |
| 267 | try: |
| 268 | excinfo = _pytest._code.ExceptionInfo[BaseException].from_exc_info( |
| 269 | rawexcinfo class="cm"># type: ignore[arg-type] |
| 270 | ) |
| 271 | class="cm"># Invoke the attributes to trigger storing the traceback |
| 272 | class="cm"># trial causes some issue there. |
| 273 | _ = excinfo.value |
| 274 | _ = excinfo.traceback |
| 275 | except TypeError: |
| 276 | try: |
| 277 | try: |
| 278 | values = traceback.format_exception(*rawexcinfo) |
| 279 | values.insert( |
| 280 | 0, |
| 281 | class="st">"NOTE: Incompatible Exception Representation, " |
| 282 | class="st">"displaying natively:\n\n", |
| 283 | ) |
| 284 | fail(class="st">"".join(values), pytrace=False) |
| 285 | except (fail.Exception, KeyboardInterrupt): |
| 286 | raise |
| 287 | except BaseException: |
| 288 | fail( |
| 289 | class="st">"ERROR: Unknown Incompatible Exception " |
| 290 | fclass="st">"representation:\n{rawexcinfo!r}", |
| 291 | pytrace=False, |
| 292 | ) |
| 293 | except KeyboardInterrupt: |
| 294 | raise |
| 295 | except fail.Exception: |
| 296 | excinfo = _pytest._code.ExceptionInfo.from_current() |
| 297 | self.__dict__.setdefault(class="st">"_excinfo", []).append(excinfo) |
| 298 | |
| 299 | def addError( |
| 300 | self, testcase: unittest.TestCase, rawexcinfo: _SysExcInfoType |
no test coverage detected