MCPcopy Index your code
hub / github.com/python/cpython / report_unexpected_exception

Method report_unexpected_exception

Lib/doctest.py:1339–1344  ·  view source on GitHub ↗

Report that the given example raised an unexpected exception.

(self, out, test, example, exc_info)

Source from the content-addressed store, hash-verified

1337 self._checker.output_difference(example, got, self.optionflags))
1338
1339 def report_unexpected_exception(self, out, test, example, exc_info):
1340 """
1341 Report that the given example raised an unexpected exception.
1342 """
1343 out(self._failure_header(test, example) +
1344 'Exception raised:\n' + _indent(_exception_traceback(exc_info)))
1345
1346 def _failure_header(self, test, example):
1347 red, reset = (

Callers 1

__runMethod · 0.95

Calls 3

_failure_headerMethod · 0.95
_indentFunction · 0.85
_exception_tracebackFunction · 0.85

Tested by

no test coverage detected