Skip to content

Commit c2ecce5

Browse files
committed
fix test
1 parent f550d65 commit c2ecce5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_grammar.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,10 @@ def test_var_annot_simple_exec(self):
383383
gns = {}; lns = {}
384384
exec("'docstring'\n"
385385
"x: int = 5\n", gns, lns)
386+
self.assertNotIn('__annotate__', gns)
387+
388+
gns.update(lns) # __annotate__ looks at globals
386389
self.assertEqual(lns["__annotate__"](annotationlib.Format.VALUE), {'x': int})
387-
with self.assertRaises(KeyError):
388-
gns['__annotate__']
389390

390391
def test_var_annot_rhs(self):
391392
ns = {}

0 commit comments

Comments
 (0)