Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2682b94

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

File tree

Expand file treeCollapse file tree

2 files changed

+9
-20
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+9
-20
lines changed

‎importlib_resources/tests/test_abc.py

Copy file name to clipboardExpand all lines: importlib_resources/tests/test_abc.py
-20Lines changed: 0 additions & 20 deletions
This file was deleted.

‎importlib_resources/tests/test_files.py

Copy file name to clipboardExpand all lines: importlib_resources/tests/test_files.py
+9Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.