Mercurial > public > mercurial-scm > hg
comparison contrib/python-zstandard/tests/test_data_structures_fuzzing.py @ 44147:5e84a96d865b
python-zstandard: blacken at 80 characters
I made this change upstream and it will make it into the next
release of python-zstandard. I figured I'd send it Mercurial's
way because it will allow us to drop this directory from the black
exclusion list.
# skip-blame blackening
Differential Revision: https://phab.mercurial-scm.org/D7937
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 22 Jan 2020 22:23:04 -0800 |
parents | de7838053207 |
children |
comparison
equal
deleted
inserted
replaced
44146:45ec64d93b3a | 44147:5e84a96d865b |
---|---|
21 min_value=zstd.WINDOWLOG_MIN, max_value=zstd.WINDOWLOG_MAX | 21 min_value=zstd.WINDOWLOG_MIN, max_value=zstd.WINDOWLOG_MAX |
22 ) | 22 ) |
23 s_chainlog = strategies.integers( | 23 s_chainlog = strategies.integers( |
24 min_value=zstd.CHAINLOG_MIN, max_value=zstd.CHAINLOG_MAX | 24 min_value=zstd.CHAINLOG_MIN, max_value=zstd.CHAINLOG_MAX |
25 ) | 25 ) |
26 s_hashlog = strategies.integers(min_value=zstd.HASHLOG_MIN, max_value=zstd.HASHLOG_MAX) | 26 s_hashlog = strategies.integers( |
27 min_value=zstd.HASHLOG_MIN, max_value=zstd.HASHLOG_MAX | |
28 ) | |
27 s_searchlog = strategies.integers( | 29 s_searchlog = strategies.integers( |
28 min_value=zstd.SEARCHLOG_MIN, max_value=zstd.SEARCHLOG_MAX | 30 min_value=zstd.SEARCHLOG_MIN, max_value=zstd.SEARCHLOG_MAX |
29 ) | 31 ) |
30 s_minmatch = strategies.integers( | 32 s_minmatch = strategies.integers( |
31 min_value=zstd.MINMATCH_MIN, max_value=zstd.MINMATCH_MAX | 33 min_value=zstd.MINMATCH_MIN, max_value=zstd.MINMATCH_MAX |
59 s_minmatch, | 61 s_minmatch, |
60 s_targetlength, | 62 s_targetlength, |
61 s_strategy, | 63 s_strategy, |
62 ) | 64 ) |
63 def test_valid_init( | 65 def test_valid_init( |
64 self, windowlog, chainlog, hashlog, searchlog, minmatch, targetlength, strategy | 66 self, |
67 windowlog, | |
68 chainlog, | |
69 hashlog, | |
70 searchlog, | |
71 minmatch, | |
72 targetlength, | |
73 strategy, | |
65 ): | 74 ): |
66 zstd.ZstdCompressionParameters( | 75 zstd.ZstdCompressionParameters( |
67 window_log=windowlog, | 76 window_log=windowlog, |
68 chain_log=chainlog, | 77 chain_log=chainlog, |
69 hash_log=hashlog, | 78 hash_log=hashlog, |
81 s_minmatch, | 90 s_minmatch, |
82 s_targetlength, | 91 s_targetlength, |
83 s_strategy, | 92 s_strategy, |
84 ) | 93 ) |
85 def test_estimated_compression_context_size( | 94 def test_estimated_compression_context_size( |
86 self, windowlog, chainlog, hashlog, searchlog, minmatch, targetlength, strategy | 95 self, |
96 windowlog, | |
97 chainlog, | |
98 hashlog, | |
99 searchlog, | |
100 minmatch, | |
101 targetlength, | |
102 strategy, | |
87 ): | 103 ): |
88 if minmatch == zstd.MINMATCH_MIN and strategy in ( | 104 if minmatch == zstd.MINMATCH_MIN and strategy in ( |
89 zstd.STRATEGY_FAST, | 105 zstd.STRATEGY_FAST, |
90 zstd.STRATEGY_GREEDY, | 106 zstd.STRATEGY_GREEDY, |
91 ): | 107 ): |