There was an error while loading. Please reload this page.
1 parent 452231c commit e33c76cCopy full SHA for e33c76c
1 file changed
Lib/test/test_lazy_import/__init__.py
@@ -706,6 +706,14 @@ def test_non_package_lazily_imported(self):
706
""")
707
assert_python_ok("-c", code)
708
709
+ def test_non_package_lazily_imported_as(self):
710
+ """Doing a dotted lazy import as still works"""
711
+ code = textwrap.dedent("""
712
+ lazy import math.pi as pi
713
+ pi
714
+ """)
715
+ assert_python_ok("-c", code)
716
+
717
def test_missing_attribute_raises_import_error(self):
718
"""Accessing a nonexistent lazy name via from import raises ImportError."""
719
code = textwrap.dedent("""
0 commit comments