comparison contrib/python-zstandard/tests/test_data_structures.py @ 42937: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
comparison
equal deleted inserted replaced
42936:2da754532dd3 42937:69de49c4e39c
98 min_match=5, 98 min_match=5,
99 target_length=16, 99 target_length=16,
100 strategy=zstd.STRATEGY_DFAST) 100 strategy=zstd.STRATEGY_DFAST)
101 101
102 # 32-bit has slightly different values from 64-bit. 102 # 32-bit has slightly different values from 64-bit.
103 self.assertAlmostEqual(p.estimated_compression_context_size(), 1294072, 103 self.assertAlmostEqual(p.estimated_compression_context_size(), 1294144,
104 delta=250) 104 delta=250)
105 105
106 def test_strategy(self): 106 def test_strategy(self):
107 with self.assertRaisesRegexp(ValueError, 'cannot specify both compression_strategy'): 107 with self.assertRaisesRegexp(ValueError, 'cannot specify both compression_strategy'):
108 zstd.ZstdCompressionParameters(strategy=0, compression_strategy=0) 108 zstd.ZstdCompressionParameters(strategy=0, compression_strategy=0)