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

Method test_closure

Lib/test/test_annotationlib.py:242–249  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

240
241class TestStringFormat(unittest.TestCase):
242 def test_closure(self):
243 x = 0
244
245 def inner(arg: x):
246 pass
247
248 anno = get_annotations(inner, format=Format.STRING)
249 self.assertEqual(anno, {"arg": "x"})
250
251 def test_closure_undefined(self):
252 if False:

Callers

nothing calls this directly

Calls 2

get_annotationsFunction · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected