mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-04 10:39:50 +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:
commit
97c5c54a0c
1 changed files with 4 additions and 2 deletions
|
@ -188,11 +188,13 @@ def test_obfuscate():
|
||||||
data = bytes(1000)
|
data = bytes(1000)
|
||||||
compressed = compressor.compress(data)
|
compressed = compressor.compress(data)
|
||||||
# N blocks + 2 id bytes obfuscator. 4 length bytes
|
# 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)
|
data = bytes(1100)
|
||||||
compressed = compressor.compress(data)
|
compressed = compressor.compress(data)
|
||||||
# N blocks + 2 id bytes obfuscator. 4 length bytes
|
# 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():
|
def test_compression_specs():
|
||||||
|
|
Loading…
Add table
Reference in a new issue