Skip to content
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
8 changes: 6 additions & 2 deletions Lib/test/test_zstd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2673,8 +2673,12 @@ def test_compress_locking(self):
input = b'a'* (16*_1K)
num_threads = 8

# gh-136394: the first output of comp.compress includes the frame header
# so it is different than the others
# this is why it is added outside of the threading part

comp = ZstdCompressor()
parts = []
parts = [comp.compress(input, ZstdCompressor.FLUSH_BLOCK)]
for _ in range(num_threads):
res = comp.compress(input, ZstdCompressor.FLUSH_BLOCK)
if res:
Expand All @@ -2683,7 +2687,7 @@ def test_compress_locking(self):
expected = b''.join(parts) + rest1

comp = ZstdCompressor()
output = []
output = [comp.compress(input, ZstdCompressor.FLUSH_BLOCK)]
def run_method(method, input_data, output_data):
res = method(input_data, ZstdCompressor.FLUSH_BLOCK)
if res:
Expand Down
Loading