(self)
| 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 = {} |
nothing calls this directly
no test coverage detected