8000 gh-125041: test_zlib: For s390x HW acceleration, only skip checking the compressed bytes by encukou · Pull Request #125042 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-125041: test_zlib: For s390x HW acceleration, only skip checking the compressed bytes #125042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
  • Loading branch information
encukou authored Oct 15, 2024
commit 213cd08ec010f0b4369bf33d5ad77c193e713728
9 changes: 4 additions & 5 deletions Lib/test/test_zlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def _zlib_runtime_version_tuple(zlib_version=zlib.ZLIB_RUNTIME_VERSION):
ZLIB_RUNTIME_VERSION_TUPLE = _zlib_runtime_version_tuple()



# bpo-46623: When a hardware accelerator is used (currently only on s390x),
# using different ways to compress data with zlib can produce different
# compressed data.
Expand Down Expand Up @@ -231,9 +230,9 @@ def test_speech128(self):
# compress more data
data = HAMLET_SCENE * 128
x = zlib.compress(data)
# With hardware acceleration, the compressed bytes
# might not be identical.
if not HW_ACCELERATED:
# With hardware acceleration, the compressed bytes
# might not be identical.
self.assertEqual(zlib.compress(bytearray(data)), x)
for ob in x, bytearray(x):
self.assertEqual(zlib.decompress(ob), data)
Expand Down Expand Up @@ -291,9 +290,9 @@ def test_pair(self):
x1 = co.compress(data)
x2 = co.flush()
self.assertRaises(zlib.error, co.flush) # second flush should not work
# With hardware acceleration, the compressed bytes might not
# be identical.
if not HW_ACCELERATED:
# With hardware acceleration, the compressed bytes might not
# be identical.
self.assertEqual(x1 + x2, datazip)
for v1, v2 in ((x1, x2), (bytearray(x1), bytearray(x2))):
dco = zlib.decompressobj()
Expand Down
Loading
0