Skip to content

Commit 2682b94

Browse files
committed
Move test for traversability into test_files.
1 parent 0bfc33c commit 2682b94

File tree

2 files changed

+9
-20
lines changed

2 files changed

+9
-20
lines changed

importlib_resources/tests/test_abc.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

importlib_resources/tests/test_files.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import typing
12
import unittest
23

34
import importlib_resources as resources
5+
from importlib_resources.abc import Traversable
46
from . import data01
57
from . import util
68

@@ -16,6 +18,13 @@ def test_read_text(self):
1618
actual = files.joinpath('utf-8.file').read_text()
1719
assert actual == 'Hello, UTF-8 world!\n'
1820

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+
1928

2029
class OpenDiskTests(FilesTests, unittest.TestCase):
2130
def setUp(self):

0 commit comments

Comments
 (0)