Skip to content

Commit

Permalink
Move the test out of doctest. Still doesn't capture failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 12, 2021
1 parent d491aea commit 9e42358
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 0 additions & 4 deletions importlib_metadata/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ def json(self) -> Dict[str, Union[str, List[str]]]:
class SimplePath(Protocol):
"""
A minimal subset of pathlib.Path required by PathDistribution.
>>> import pathlib
>>> import typing
>>> _: SimplePath = typing.cast(pathlib.Path, None)
"""

def joinpath(self) -> 'SimplePath':
Expand Down
9 changes: 9 additions & 0 deletions tests/test_meta.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import typing
import pathlib

from importlib_metadata import _meta


class TestSimplePath:
def test_cast_from_Path(self):
_: _meta.SimplePath = typing.cast(pathlib.Path, None)

0 comments on commit 9e42358

Please sign in to comment.