Skip to content

Commit

Permalink
Make mypy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon committed Oct 25, 2017
1 parent e4a48c1 commit 53747f5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions importlib_resources/tests/test_open.py
Expand Up @@ -33,11 +33,9 @@ def test_pathlib_path(self):
with resources.open(data, path) as file:
pass # No error.

# Don't fail if run under e.g. pytest.
@unittest.skipIf(__spec__ is None, '__spec__ is None')
def test_absolute_path(self):
# An absolute path is a ValueError.
path = pathlib.Path(__spec__.origin)
path = pathlib.Path(__file__)
full_path = path.parent/'utf-8.file'
with self.assertRaises(ValueError):
with resources.open(data, str(full_path)) as file:
Expand Down

0 comments on commit 53747f5

Please sign in to comment.