Skip to content

Commit 061b3ef

Browse files
lp issue
1 parent 5d2d099 commit 061b3ef

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • cinderx/PythonLib/test_cinderx/test_compiler/test_strict

cinderx/PythonLib/test_cinderx/test_compiler/test_strict/test_loader.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@
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
5758
except 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",

0 commit comments

Comments
 (0)