Skip to content

Commit

Permalink
Updated the contents of the binary files in the subdirectories so the…
Browse files Browse the repository at this point in the history
…re's less chance of accidentally matching one for the other.
  • Loading branch information
jaraco committed Feb 25, 2024
1 parent 6c9b190 commit 168f617
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Binary file modified importlib_resources/tests/data01/subdirectory/binary.file
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions importlib_resources/tests/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ class ReadZipTests(ReadTests, util.ZipSetup, unittest.TestCase):
def test_read_submodule_resource(self):
submodule = import_module('data01.subdirectory')
result = resources.files(submodule).joinpath('binary.file').read_bytes()
self.assertEqual(result, b'\0\1\2\3')
self.assertEqual(result, b'\4\5\6\x07')

def test_read_submodule_resource_by_name(self):
result = (
resources.files('data01.subdirectory').joinpath('binary.file').read_bytes()
)
self.assertEqual(result, b'\0\1\2\3')
self.assertEqual(result, b'\4\5\6\x07')


class ReadNamespaceTests(ReadTests, unittest.TestCase):
Expand All @@ -82,15 +82,15 @@ class ReadNamespaceZipTests(ReadTests, util.ZipSetup, unittest.TestCase):
def test_read_submodule_resource(self):
submodule = import_module('namespacedata01.subdirectory')
result = resources.files(submodule).joinpath('binary.file').read_bytes()
self.assertEqual(result, b'\0\1\2\3')
self.assertEqual(result, b'\x0c\x0d\x0e\x0f')

def test_read_submodule_resource_by_name(self):
result = (
resources.files('namespacedata01.subdirectory')
.joinpath('binary.file')
.read_bytes()
)
self.assertEqual(result, b'\0\1\2\3')
self.assertEqual(result, b'\x0c\x0d\x0e\x0f')


if __name__ == '__main__':
Expand Down

0 comments on commit 168f617

Please sign in to comment.