@@ -232,30 +232,30 @@ def tearDown(self):
232232 def test_lazy_try_except (self ):
233233 """lazy import inside try/except should raise SyntaxError."""
234234 with self .assertRaises (SyntaxError ):
235- import test .test_import .data .lazy_imports .lazy_try_except
235+ import test .test_import .data .lazy_imports .badsyntax . lazy_try_except
236236
237237 def test_lazy_try_except_from (self ):
238238 """lazy from import inside try/except should raise SyntaxError."""
239239 with self .assertRaises (SyntaxError ):
240- import test .test_import .data .lazy_imports .lazy_try_except_from
240+ import test .test_import .data .lazy_imports .badsyntax . lazy_try_except_from
241241
242242 def test_lazy_try_except_from_star (self ):
243243 """lazy from import * should raise SyntaxError."""
244244 with self .assertRaises (SyntaxError ):
245- import test .test_import .data .lazy_imports .lazy_try_except_from_star
245+ import test .test_import .data .lazy_imports .badsyntax . lazy_try_except_from_star
246246
247247 def test_lazy_future_import (self ):
248248 """lazy from __future__ import should raise SyntaxError."""
249249 with self .assertRaises (SyntaxError ) as cm :
250- import test .test_import .data .lazy_imports .lazy_future_import
250+ import test .test_import .data .lazy_imports .badsyntax . lazy_future_import
251251 # Check we highlight 'lazy' (column offset 0, end offset 4)
252252 self .assertEqual (cm .exception .offset , 1 )
253253 self .assertEqual (cm .exception .end_offset , 5 )
254254
255255 def test_lazy_import_func (self ):
256256 """lazy import inside function should raise SyntaxError."""
257257 with self .assertRaises (SyntaxError ):
258- import test .test_import .data .lazy_imports .lazy_import_func
258+ import test .test_import .data .lazy_imports .badsyntax . lazy_import_func
259259
260260 def test_lazy_import_exec_in_function (self ):
261261 """lazy import via exec() inside a function should raise SyntaxError."""
@@ -1223,7 +1223,7 @@ def test_lazy_import_inside_class_raises_syntax_error(self):
12231223 # PEP 810: "The soft keyword is only allowed at the global (module) level,
12241224 # not inside functions, class bodies, try blocks, or import *"
12251225 with self .assertRaises (SyntaxError ):
1226- import test .test_import .data .lazy_imports .lazy_class_body
1226+ import test .test_import .data .lazy_imports .badsyntax . lazy_class_body
12271227
12281228
12291229class MixedLazyEagerImportTests (unittest .TestCase ):
0 commit comments