We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bfc33c commit 2682b94Copy full SHA for 2682b94
importlib_resources/tests/test_abc.py
importlib_resources/tests/test_files.py
@@ -1,6 +1,8 @@
1
+import typing
2
import unittest
3
4
import importlib_resources as resources
5
+from importlib_resources.abc import Traversable
6
from . import data01
7
from . import util
8
@@ -16,6 +18,13 @@ def test_read_text(self):
16
18
actual = files.joinpath('utf-8.file').read_text()
17
19
assert actual == 'Hello, UTF-8 world!\n'
20
21
+ @unittest.skipUnless(
22
+ hasattr(typing, 'runtime_checkable'),
23
+ "Only suitable when typing supports runtime_checkable",
24
+ )
25
+ def test_traversable(self):
26
+ assert isinstance(resources.files(self.data), Traversable)
27
+
28
29
class OpenDiskTests(FilesTests, unittest.TestCase):
30
def setUp(self):
0 commit comments