Skip to content

Commit b3d4f87

Browse files
committed
Ensure that function import directly from submodule still works
1 parent 6e4fff5 commit b3d4f87

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_lazy_loader.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,8 @@ def test_attach_same_module_and_attr_name():
103103
# override function by module
104104
assert isinstance(fake_pkg.some_func, types.FunctionType)
105105
assert isinstance(fake_pkg.some_func, types.FunctionType)
106+
107+
# Ensure imports from submodule still work
108+
from fake_pkg.some_func import some_func
109+
110+
assert isinstance(some_func, types.FunctionType)

0 commit comments

Comments
 (0)