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

Method test_var_annot_simple_exec

Lib/test/test_grammar.py:420–427  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

418 ann_module3.D_bad_ann(5)
419
420 def test_var_annot_simple_exec(self):
421 gns = {}; lns = {}
422 exec("'docstring'\n"
423 "x: int = 5\n", gns, lns)
424 self.assertNotIn('__annotate__', gns)
425
426 gns.update(lns) # __annotate__ looks at globals
427 self.assertEqual(lns["__annotate__"](annotationlib.Format.VALUE), {'x': int})
428
429 def test_var_annot_rhs(self):
430 ns = {}

Callers

nothing calls this directly

Calls 3

assertNotInMethod · 0.80
updateMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected