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

Method test_extract_stack

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

Source from the content-addressed store, hash-verified

3294 self.assertEqual(len(inner_frame.f_locals), 0)
3295
3296 def test_extract_stack(self):
3297 def extract():
3298 return traceback.extract_stack()
3299 result = extract()
3300 lineno = extract.__code__.co_firstlineno
3301 self.assertEqual(result[-2:], [
3302 (__file__, lineno+2, 'test_extract_stack', 'result = extract()'),
3303 (__file__, lineno+1, 'extract', 'return traceback.extract_stack()'),
3304 ])
3305 self.assertEqual(len(result[0]), 4)
3306
3307
3308class TestFrame(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

extractFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected