We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f550d65 commit c2ecce5Copy full SHA for c2ecce5
Lib/test/test_grammar.py
@@ -383,9 +383,10 @@ def test_var_annot_simple_exec(self):
383
gns = {}; lns = {}
384
exec("'docstring'\n"
385
"x: int = 5\n", gns, lns)
386
+ self.assertNotIn('__annotate__', gns)
387
+
388
+ gns.update(lns) # __annotate__ looks at globals
389
self.assertEqual(lns["__annotate__"](annotationlib.Format.VALUE), {'x': int})
- with self.assertRaises(KeyError):
- gns['__annotate__']
390
391
def test_var_annot_rhs(self):
392
ns = {}
0 commit comments