Skip to content

Commit

Permalink
Change the assertions for test_join_path to assert that the subdirect…
Browse files Browse the repository at this point in the history
…ory is a multiplexed path to avoid touching implementation details.
  • Loading branch information
jaraco committed Feb 25, 2024
1 parent b68509f commit 6c9b190
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions importlib_resources/tests/test_reader.py
Expand Up @@ -68,14 +68,10 @@ def test_join_path(self):
str(path.joinpath('binary.file'))[len(prefix) + 1 :],
os.path.join('namespacedata01', 'binary.file'),
)
self.assertEqual(
str(path.joinpath('subdirectory')._paths[0])[len(prefix) + 1 :],
os.path.join('namespacedata01', 'subdirectory'),
)
self.assertEqual(
str(path.joinpath('subdirectory')._paths[1])[len(prefix) + 1 :],
os.path.join('data01', 'subdirectory'),
)
sub = path.joinpath('subdirectory')
assert isinstance(sub, MultiplexedPath)
assert 'namespacedata01' in str(sub)
assert 'data01' in str(sub)
self.assertEqual(
str(path.joinpath('imaginary'))[len(prefix) + 1 :],
os.path.join('namespacedata01', 'imaginary'),
Expand Down

0 comments on commit 6c9b190

Please sign in to comment.