MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / format_failure

Method format_failure

tools/python-3.11.9-amd64/Lib/doctest.py:2245–2255  ·  view source on GitHub ↗
(self, err)

Source from the content-addressed store, hash-verified

2243 raise self.failureException(self.format_failure(new.getvalue()))
2244
2245 def format_failure(self, err):
2246 test = self._dt_test
2247 if test.lineno is None:
2248 lineno = 'unknown line number'
2249 else:
2250 lineno = '%s' % test.lineno
2251 lname = '.'.join(test.name.split('.')[-1:])
2252 return ('Failed doctest test for %s\n'
2253 ' File "%s", line %s, in %s\n\n%s'
2254 % (test.name, test.filename, lineno, lname, err)
2255 )
2256
2257 def debug(self):
2258 r"""Run the test case without results and without catching exceptions

Callers 1

runTestMethod · 0.95

Calls 2

joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected