aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_importlib/resources/test_open.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2024-06-04 02:36:28 -0400
committerGitHub <noreply@github.com>2024-06-04 06:36:28 +0000
commit8d63c8d47b9edd8ac2f0b395b2fa0ae5f571252d (patch)
tree028aec5f4e450d64dc45cc26cd7855dcd10fd804 /Lib/test/test_importlib/resources/test_open.py
parent31a4fb3c74a0284436343858803b54471e2dc9c7 (diff)
downloadcpython-8d63c8d47b9edd8ac2f0b395b2fa0ae5f571252d.tar.gz
cpython-8d63c8d47b9edd8ac2f0b395b2fa0ae5f571252d.zip
gh-106531: Apply changes from importlib_resources 6.3.2 (#117054)
Apply changes from importlib_resources 6.3.2.
Diffstat (limited to 'Lib/test/test_importlib/resources/test_open.py')
-rw-r--r--Lib/test/test_importlib/resources/test_open.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_importlib/resources/test_open.py b/Lib/test/test_importlib/resources/test_open.py
index 86becb4bfaa..3b6b2142ef4 100644
--- a/Lib/test/test_importlib/resources/test_open.py
+++ b/Lib/test/test_importlib/resources/test_open.py
@@ -24,7 +24,7 @@ class OpenTests:
target = resources.files(self.data) / 'binary.file'
with target.open('rb') as fp:
result = fp.read()
- self.assertEqual(result, b'\x00\x01\x02\x03')
+ self.assertEqual(result, bytes(range(4)))
def test_open_text_default_encoding(self):
target = resources.files(self.data) / 'utf-8.file'
@@ -81,5 +81,9 @@ class OpenZipTests(OpenTests, util.ZipSetup, unittest.TestCase):
pass
+class OpenNamespaceZipTests(OpenTests, util.ZipSetup, unittest.TestCase):
+ ZIP_MODULE = 'namespacedata01'
+
+
if __name__ == '__main__':
unittest.main()