Skip to content

Commit ca4d14b

Browse files
committed
Switch to src layout, move tests to root
1 parent 024e49f commit ca4d14b

File tree

8 files changed

+4
-4
lines changed

8 files changed

+4
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ log_cli_level = "info"
4848

4949
[tool.ruff]
5050
exclude = [
51-
"lazy_loader/tests/fake_pkg/__init__.pyi",
51+
"tests/fake_pkg/__init__.pyi",
5252
]
5353

5454
[tool.ruff.lint]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

lazy_loader/tests/test_lazy_loader.py renamed to tests/test_lazy_loader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ def test_lazy_attach_returns_copies():
128128

129129

130130
def test_attach_same_module_and_attr_name():
131-
from lazy_loader.tests import fake_pkg
131+
from tests import fake_pkg
132132

133133
# Grab attribute twice, to ensure that importing it does not
134134
# override function by module
135135
assert isinstance(fake_pkg.some_func, types.FunctionType)
136136
assert isinstance(fake_pkg.some_func, types.FunctionType)
137137

138138
# Ensure imports from submodule still work
139-
from lazy_loader.tests.fake_pkg.some_func import some_func
139+
from tests.fake_pkg.some_func import some_func
140140

141141
assert isinstance(some_func, types.FunctionType)
142142

@@ -157,7 +157,7 @@ def test_stub_loading(tmp_path):
157157

158158

159159
def test_stub_loading_parity():
160-
from lazy_loader.tests import fake_pkg
160+
from tests import fake_pkg
161161

162162
from_stub = lazy.attach_stub(fake_pkg.__name__, fake_pkg.__file__)
163163
stub_getter, stub_dir, stub_all = from_stub

0 commit comments

Comments
 (0)