diff --git a/importlib_resources/tests/test_open.py b/importlib_resources/tests/test_open.py index afc05e2e71e5e27..a9fe11501b26765 100644 --- a/importlib_resources/tests/test_open.py +++ b/importlib_resources/tests/test_open.py @@ -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: