mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-04 06:21:46 +00:00
"auto" compressor tests: do not assume zlib is better than lz4, fixes #7363
while that might be true for many cases, we can not assume it is always true, as proven by the failing test on S390.
This commit is contained in:
parent
7ce0887070
commit
e7de9dcdcb
1 changed files with 2 additions and 1 deletions
|
@ -146,7 +146,8 @@ def test_auto():
|
|||
ratio = len(compressed_zlib) / len(compressed_lz4)
|
||||
assert meta["ctype"] == ZLIB.ID if ratio < 0.99 else LZ4.ID
|
||||
assert meta["clevel"] == 9 if ratio < 0.99 else 255
|
||||
assert meta["csize"] == len(compressed_auto_zlib)
|
||||
smallest_csize = min(len(compressed_zlib), len(compressed_lz4))
|
||||
assert meta["csize"] == len(compressed_auto_zlib) == smallest_csize
|
||||
|
||||
data = b"\x00\xb8\xa3\xa2-O\xe1i\xb6\x12\x03\xc21\xf3\x8a\xf78\\\x01\xa5b\x07\x95\xbeE\xf8\xa3\x9ahm\xb1~"
|
||||
meta, compressed = compressor_auto_zlib.compress(dict(meta), data)
|
||||
|
|
Loading…
Reference in a new issue