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

Method test_extract_stack_lookup_lines

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

Source from the content-addressed store, hash-verified

3457 self.assertEqual(len(s), 5)
3458
3459 def test_extract_stack_lookup_lines(self):
3460 linecache.clearcache()
3461 linecache.updatecache('/foo.py', globals())
3462 c = test_code('/foo.py', 'method')
3463 f = test_frame(c, None, None)
3464 s = traceback.StackSummary.extract(iter([(f, 6)]), lookup_lines=True)
3465 linecache.clearcache()
3466 self.assertEqual(s[0].line, "import sys")
3467
3468 def test_extract_stackup_deferred_lookup_lines(self):
3469 linecache.clearcache()

Callers

nothing calls this directly

Calls 4

globalsFunction · 0.85
iterFunction · 0.85
extractMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected