1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-04 02:28:34 +00:00

Merge pull request #6775 from wizeman/fix-obfuscate-1.2

fix test_obfuscate byte accounting (backport #6773 to 1.2-maint)
This commit is contained in:
TW 2022-06-14 17:29:24 +02:00 committed by GitHub
commit 97c5c54a0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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():