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

Method test_locals

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

Source from the content-addressed store, hash-verified

3419 s.format())
3420
3421 def test_locals(self):
3422 linecache.updatecache('/foo.py', globals())
3423 c = test_code('/foo.py', 'method')
3424 f = test_frame(c, globals(), {'something': 1})
3425 s = traceback.StackSummary.extract(iter([(f, 6)]), capture_locals=True)
3426 self.assertEqual(s[0].locals, {'something': '1'})
3427
3428 def test_no_locals(self):
3429 linecache.updatecache('/foo.py', globals())

Callers

nothing calls this directly

Calls 2

extractMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected