Skip to content

Commit 48fa12a

Browse files
committed
reproduce python#18997
1 parent 7b4f631 commit 48fa12a

File tree

6 files changed

+8
-0
lines changed

6 files changed

+8
-0
lines changed

mypy/test/testmodulefinder.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ def test__packages_with_ns(self) -> None:
195195
("pkg_typed.b", self.path("pkg_typed", "b", "__init__.py")),
196196
("pkg_typed.b.c", self.path("pkg_typed", "b", "c.py")),
197197
("pkg_typed.a.a_var", ModuleNotFoundReason.NOT_FOUND),
198+
# Regular package with py.typed, bundled stubs, and external stubs-only package
199+
("pkg_typed_w_stubs", self.path("pkg_typed_w_stubs-stubs", "__init__.pyi")),
198200
# Regular package without py.typed
199201
("pkg_untyped", ModuleNotFoundReason.FOUND_WITHOUT_TYPE_HINTS),
200202
("pkg_untyped.a", ModuleNotFoundReason.FOUND_WITHOUT_TYPE_HINTS),
@@ -250,6 +252,8 @@ def test__packages_without_ns(self) -> None:
250252
("pkg_typed.b", self.path("pkg_typed", "b", "__init__.py")),
251253
("pkg_typed.b.c", self.path("pkg_typed", "b", "c.py")),
252254
("pkg_typed.a.a_var", ModuleNotFoundReason.NOT_FOUND),
255+
# Regular package with py.typed, bundled stubs, and external stubs-only package
256+
("pkg_typed_w_stubs", self.path("pkg_typed_w_stubs-stubs", "__init__.pyi")),
253257
# Regular package without py.typed
254258
("pkg_untyped", ModuleNotFoundReason.FOUND_WITHOUT_TYPE_HINTS),
255259
("pkg_untyped.a", ModuleNotFoundReason.FOUND_WITHOUT_TYPE_HINTS),
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
qux_var: int
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pkg_typed_w_stubs_var: str = ...
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pkg_typed_w_stubs_var = "pkg_typed_w_stubs"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pkg_typed_w_stubs_var: object

test-data/packages/modulefinder-site-packages/pkg_typed_w_stubs/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)