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

Method test_extract_stack_lookup_lines

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

Source from the content-addressed store, hash-verified

3379 self.assertEqual(len(s), 5)
3380
3381 def test_extract_stack_lookup_lines(self):
3382 linecache.clearcache()
3383 linecache.updatecache('/foo.py', globals())
3384 c = test_code('/foo.py', 'method')
3385 f = test_frame(c, None, None)
3386 s = traceback.StackSummary.extract(iter([(f, 6)]), lookup_lines=True)
3387 linecache.clearcache()
3388 self.assertEqual(s[0].line, "import sys")
3389
3390 def test_extract_stackup_deferred_lookup_lines(self):
3391 linecache.clearcache()

Callers

nothing calls this directly

Calls 2

extractMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected