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

Method format_failure

Lib/doctest.py:2410–2420  ·  view source on GitHub ↗
(self, err)

Source from the content-addressed store, hash-verified

2408 raise unittest.SkipTest("all examples were skipped")
2409
2410 def format_failure(self, err):
2411 test = self._dt_test
2412 if test.lineno is None:
2413 lineno = 'unknown line number'
2414 else:
2415 lineno = '%s' % test.lineno
2416 lname = '.'.join(test.name.split('.')[-1:])
2417 return ('Failed doctest test for %s\n'
2418 ' File "%s", line %s, in %s\n\n%s'
2419 % (test.name, test.filename, lineno, lname, err)
2420 )
2421
2422 def debug(self):
2423 r"""Run the test case without results and without catching exceptions

Callers

nothing calls this directly

Calls 2

joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected