File tree Expand file tree Collapse file tree
cinderx/PythonLib/test_cinderx/test_compiler/test_strict Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 # pyre-ignore[21]: cinder module not typed.
5454 from cinder import cinder_set_warn_handler , get_warn_handler
5555 impl_ ._set_lazy_imports
56+ lazy_imports_not_set = False
5657 HAVE_WARN_HANDLERS : bool = True
5758except ImportError :
58- sys . set_lazy_imports ( "all" )
59+ lazy_imports_not_set = True
5960 def cinder_set_warn_handler (func ):
6061 pass
6162
@@ -2282,6 +2283,7 @@ def test_syntax_error_import(self) -> None:
22822283 self .sbx .strict_import ("b" )
22832284
22842285 @passIf (sys .version_info >= (3 , 15 ), "no lazy imports on 3.15" )
2286+ @passIf (lazy_imports_not_set , "Lazy Imports not set" )
22852287 def test_strict_loader_lazy_imports_cycle (self ) -> None :
22862288 self .sbx .write_file (
22872289 "main.py" ,
@@ -2472,6 +2474,7 @@ def f(c: mod.C):
24722474 self .assertIs (other .f (c ), c )
24732475
24742476 @passIf (sys .version_info >= (3 , 15 ), "no lazy imports on 3.15" )
2477+ @passIf (lazy_imports_not_set , "Lazy Imports not set" )
24752478 def test_strict_lazy_import_cycle (self ):
24762479 self .sbx .write_file (
24772480 "mod/__init__.py" ,
You can’t perform that action at this time.
0 commit comments