1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-04 10:39:50 +00:00

fix test_obfuscate byte accounting

This commit is contained in:
Ricardo M. Correia 2022-06-14 14:55:02 +02:00
parent bab00fb47b
commit 333320ad56

View file

@ -188,11 +188,13 @@ def test_obfuscate():
data = bytes(1000)
compressed = compressor.compress(data)
# N blocks + 2 id bytes obfuscator. 4 length bytes
assert 1000 + 6 <= len(compressed) <= 1000 + 6 + 1024
# The 'none' compressor also adds 2 id bytes
assert 6 + 2 + 1000 <= len(compressed) <= 6 + 2 + 1000 + 1024
data = bytes(1100)
compressed = compressor.compress(data)
# N blocks + 2 id bytes obfuscator. 4 length bytes
assert 1100 + 6 <= len(compressed) <= 1100 + 6 + 1024
# The 'none' compressor also adds 2 id bytes
assert 6 + 2 + 1100 <= len(compressed) <= 6 + 2 + 1100 + 1024
def test_compression_specs():