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

Method report_failure

Lib/doctest.py:2331–2337  ·  view source on GitHub ↗
(self, out, test, example, got)

Source from the content-addressed store, hash-verified

2329 self._test_result.addSubTest(self._test_case, self._subTest(), exc_info)
2330
2331 def report_failure(self, out, test, example, got):
2332 msg = ('Failed example:\n' + _indent(example.source) +
2333 self._checker.output_difference(example, got, self.optionflags).rstrip('\n'))
2334 exc = self._test_case.failureException(msg)
2335 tb = self._add_traceback(None, test, example)
2336 exc_info = (type(exc), exc, tb)
2337 self._test_result.addSubTest(self._test_case, self._subTest(), exc_info)
2338
2339 def _add_traceback(self, traceback, test, example):
2340 if test.lineno is None or example.lineno is None:

Callers

nothing calls this directly

Calls 6

_add_tracebackMethod · 0.95
_subTestMethod · 0.95
_indentFunction · 0.85
output_differenceMethod · 0.80
rstripMethod · 0.45
addSubTestMethod · 0.45

Tested by

no test coverage detected