fix test_buzhash_chunksize_distribution

the last chunk can be smaller than 2**min_exp.
This commit is contained in:
Thomas Waldmann 2023-06-06 10:09:53 +02:00
parent 05193d2530
commit 6625fb52ac
No known key found for this signature in database
GPG Key ID: 243ACFA951F78E01
1 changed files with 1 additions and 0 deletions

View File

@ -159,6 +159,7 @@ def test_buzhash_chunksize_distribution():
chunker = Chunker(0, min_exp, max_exp, mask, 4095)
f = BytesIO(data)
chunks = cf(chunker.chunkify(f))
del chunks[-1] # get rid of the last chunk, it can be smaller than 2**min_exp
chunk_sizes = [len(chunk) for chunk in chunks]
chunks_count = len(chunks)
min_chunksize_observed = min(chunk_sizes)