Mercurial > public > mercurial-scm > hg
diff contrib/python-zstandard/tests/test_data_structures.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 | 5e84a96d865b |
children |
line wrap: on
line diff
--- a/contrib/python-zstandard/tests/test_data_structures.py Mon Jan 06 14:07:43 2025 -0500 +++ b/contrib/python-zstandard/tests/test_data_structures.py Mon Jan 06 14:15:40 2025 -0500 @@ -164,15 +164,15 @@ # Python 3 doesn't appear to convert unicode to Py_buffer. if sys.version_info[0] >= 3: with self.assertRaises(TypeError): - zstd.get_frame_parameters(u"foobarbaz") + zstd.get_frame_parameters("foobarbaz") else: # CPython will convert unicode to Py_buffer. But CFFI won't. if zstd.backend == "cffi": with self.assertRaises(TypeError): - zstd.get_frame_parameters(u"foobarbaz") + zstd.get_frame_parameters("foobarbaz") else: with self.assertRaises(zstd.ZstdError): - zstd.get_frame_parameters(u"foobarbaz") + zstd.get_frame_parameters("foobarbaz") def test_invalid_input_sizes(self): with self.assertRaisesRegex(