Mercurial > public > mercurial-scm > hg
comparison contrib/python-zstandard/tests/test_compressor.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 |
comparison
equal
deleted
inserted
replaced
52638:dc36535a5edc | 52639:9db77d46de79 |
---|---|
1676 cctx.multi_compress_to_buffer((1, 2)) | 1676 cctx.multi_compress_to_buffer((1, 2)) |
1677 | 1677 |
1678 with self.assertRaisesRegex( | 1678 with self.assertRaisesRegex( |
1679 TypeError, "item 0 not a bytes like object" | 1679 TypeError, "item 0 not a bytes like object" |
1680 ): | 1680 ): |
1681 cctx.multi_compress_to_buffer([u"foo"]) | 1681 cctx.multi_compress_to_buffer(["foo"]) |
1682 | 1682 |
1683 def test_empty_input(self): | 1683 def test_empty_input(self): |
1684 cctx = zstd.ZstdCompressor() | 1684 cctx = zstd.ZstdCompressor() |
1685 | 1685 |
1686 if not hasattr(cctx, "multi_compress_to_buffer"): | 1686 if not hasattr(cctx, "multi_compress_to_buffer"): |