Mercurial > public > mercurial-scm > hg-stable
diff contrib/python-zstandard/tests/test_compressor.py @ 42941:69de49c4e39c
zstandard: vendor python-zstandard 0.12
The upstream source distribution from PyPI was extracted. Unwanted
files were removed.
The clang-format ignore list was updated to reflect the new source
of files.
test-repo-compengines.t was updated to reflect a change in behavior
of the zstd library.
The project contains a vendored copy of zstandard 1.4.3. The old
version was 1.3.8. This should result in some minor performance wins.
# no-check-commit because 3rd party code has different style guidelines
Differential Revision: https://phab.mercurial-scm.org/D6858
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 15 Sep 2019 20:04:00 -0700 |
parents | 675775c33ab6 |
children | de7838053207 |
line wrap: on
line diff
--- a/contrib/python-zstandard/tests/test_compressor.py Sun Sep 15 00:07:30 2019 -0400 +++ b/contrib/python-zstandard/tests/test_compressor.py Sun Sep 15 20:04:00 2019 -0700 @@ -1038,7 +1038,7 @@ d = zstd.train_dictionary(8192, samples) h = hashlib.sha1(d.as_bytes()).hexdigest() - self.assertEqual(h, '88ca0d38332aff379d4ced166a51c280a7679aad') + self.assertEqual(h, '7a2e59a876db958f74257141045af8f912e00d4e') buffer = NonClosingBytesIO() cctx = zstd.ZstdCompressor(level=9, dict_data=d) @@ -1056,7 +1056,7 @@ self.assertFalse(params.has_checksum) h = hashlib.sha1(compressed).hexdigest() - self.assertEqual(h, '8703b4316f274d26697ea5dd480f29c08e85d940') + self.assertEqual(h, '0a7c05635061f58039727cdbe76388c6f4cfef06') source = b'foo' + b'bar' + (b'foo' * 16384) @@ -1091,7 +1091,7 @@ self.assertFalse(params.has_checksum) h = hashlib.sha1(compressed).hexdigest() - self.assertEqual(h, '2a8111d72eb5004cdcecbdac37da9f26720d30ef') + self.assertEqual(h, 'dd4bb7d37c1a0235b38a2f6b462814376843ef0b') def test_write_checksum(self): no_checksum = NonClosingBytesIO()