MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_extract_stack

Method test_extract_stack

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

Source from the content-addressed store, hash-verified

3372 self.assertEqual(len(inner_frame.f_locals), 0)
3373
3374 def test_extract_stack(self):
3375 def extract():
3376 return traceback.extract_stack()
3377 result = extract()
3378 lineno = extract.__code__.co_firstlineno
3379 self.assertEqual(result[-2:], [
3380 (__file__, lineno+2, 'test_extract_stack', 'result = extract()'),
3381 (__file__, lineno+1, 'extract', 'return traceback.extract_stack()'),
3382 ])
3383 self.assertEqual(len(result[0]), 4)
3384
3385
3386class TestFrame(unittest.TestCase):

Callers

nothing calls this directly

Calls 3

extractFunction · 0.85
lenFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected