File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2
2
# This just tests whether the parser accepts them all.
3
3
4
4
from test .support import check_syntax_error
5
+ from test .support import import_helper
5
6
from test .support .warnings_helper import check_syntax_warning
6
7
import inspect
7
8
import unittest
@@ -392,13 +393,13 @@ def test_var_annot_module_semantics(self):
392
393
def test_var_annot_in_module (self ):
393
394
# check that functions fail the same way when executed
394
395
# outside of module where they were defined
395
- from test .ann_module3 import f_bad_ann , g_bad_ann , D_bad_ann
396
+ ann_module3 = import_helper . import_fresh_module ( " test.ann_module3" )
396
397
with self .assertRaises (NameError ):
397
- f_bad_ann ()
398
+ ann_module3 . f_bad_ann ()
398
399
with self .assertRaises (NameError ):
399
- g_bad_ann ()
400
+ ann_module3 . g_bad_ann ()
400
401
with self .assertRaises (NameError ):
401
- D_bad_ann (5 )
402
+ ann_module3 . D_bad_ann (5 )
402
403
403
404
def test_var_annot_simple_exec (self ):
404
405
gns = {}; lns = {}
You can’t perform that action at this time.
0 commit comments