diff contrib/python-zstandard/tests/test_decompressor.py @ 52639:9db77d46de79

py3: drop redundant `u''` prefixes on string literals Strings are unicode on Python 3. These were rewritten by `pyupgrade`. It's arguably better to fix the `contrib` stuff upstream and then re-vendor it, but I don't feel like waiting for that, and then all of the regression testing involved to get a minor improvement in the codebase. It was last vendored 5 years ago, and will likely be a large change anyway to drop py2 support. Also, we've already made minor formatting changes to it locally.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 06 Jan 2025 14:15:40 -0500
parents ca7bde5dbafb
children
line wrap: on
line diff
--- a/contrib/python-zstandard/tests/test_decompressor.py	Mon Jan 06 14:07:43 2025 -0500
+++ b/contrib/python-zstandard/tests/test_decompressor.py	Mon Jan 06 14:15:40 2025 -0500
@@ -1370,7 +1370,7 @@
             dctx.decompress_content_dict_chain([])
 
         with self.assertRaisesRegex(ValueError, "chunk 0 must be bytes"):
-            dctx.decompress_content_dict_chain([u"foo"])
+            dctx.decompress_content_dict_chain(["foo"])
 
         with self.assertRaisesRegex(ValueError, "chunk 0 must be bytes"):
             dctx.decompress_content_dict_chain([True])
@@ -1408,7 +1408,7 @@
         dctx = zstd.ZstdDecompressor()
 
         with self.assertRaisesRegex(ValueError, "chunk 1 must be bytes"):
-            dctx.decompress_content_dict_chain([initial, u"foo"])
+            dctx.decompress_content_dict_chain([initial, "foo"])
 
         with self.assertRaisesRegex(ValueError, "chunk 1 must be bytes"):
             dctx.decompress_content_dict_chain([initial, None])
@@ -1485,7 +1485,7 @@
         with self.assertRaisesRegex(
             TypeError, "item 0 not a bytes like object"
         ):
-            dctx.multi_decompress_to_buffer([u"foo"])
+            dctx.multi_decompress_to_buffer(["foo"])
 
         with self.assertRaisesRegex(
             ValueError, "could not determine decompressed size of item 0"