Skip to content

Commit 0989bb2

Browse files
committed
test: Add auxiliary func to test module name != attr name
1 parent de63cfe commit 0989bb2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

tests/fake_pkg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import lazy_loader as lazy
22

33
__getattr__, __lazy_dir__, __all__ = lazy.attach(
4-
__name__, submod_attrs={"some_func": ["some_func"]}
4+
__name__, submod_attrs={"some_func": ["some_func", "aux_func"]}
55
)

tests/fake_pkg/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .some_func import some_func
1+
from .some_func import aux_func, some_func

tests/fake_pkg/some_func.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
def some_func():
22
"""Function with same name as submodule."""
3+
4+
5+
def aux_func():
6+
"""Auxiliary function."""

0 commit comments

Comments
 (0)