Skip to content

Commit 9e42358

Browse files
committed
Move the test out of doctest. Still doesn't capture failure.
1 parent d491aea commit 9e42358

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

importlib_metadata/_meta.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ def json(self) -> Dict[str, Union[str, List[str]]]:
3333
class SimplePath(Protocol):
3434
"""
3535
A minimal subset of pathlib.Path required by PathDistribution.
36-
37-
>>> import pathlib
38-
>>> import typing
39-
>>> _: SimplePath = typing.cast(pathlib.Path, None)
4036
"""
4137

4238
def joinpath(self) -> 'SimplePath':

tests/test_meta.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import typing
2+
import pathlib
3+
4+
from importlib_metadata import _meta
5+
6+
7+
class TestSimplePath:
8+
def test_cast_from_Path(self):
9+
_: _meta.SimplePath = typing.cast(pathlib.Path, None)

0 commit comments

Comments
 (0)