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

Method test_format_stack

Lib/test/test_traceback.py:2197–2207  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2195 self._check_recursive_traceback_display(render_exc)
2196
2197 def test_format_stack(self):
2198 def fmt():
2199 return traceback.format_stack()
2200 result = fmt()
2201 lineno = fmt.__code__.co_firstlineno
2202 self.assertEqual(result[-2:], [
2203 ' File "%s", line %d, in test_format_stack\n'
2204 ' result = fmt()\n' % (__file__, lineno+2),
2205 ' File "%s", line %d, in fmt\n'
2206 ' return traceback.format_stack()\n' % (__file__, lineno+1),
2207 ])
2208
2209 @cpython_only
2210 def test_unhashable(self):

Callers

nothing calls this directly

Calls 2

fmtFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected