Skip to content

Commit f918772

Browse files
emmatypingRogdham
andauthored
Use options kwarg in tests
Co-authored-by: Rogdham <[email protected]>
1 parent b11b85b commit f918772

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_zstd/test_core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def test_compress_parameters(self):
258258
# larger than signed int, ValueError
259259
d1 = d.copy()
260260
d1[CParameter.ldm_bucket_size_log] = 2**31
261-
self.assertRaises(ValueError, ZstdCompressor, d1)
261+
self.assertRaises(ValueError, ZstdCompressor, options=d1)
262262

263263
# clamp compressionLevel
264264
level_min, level_max = CParameter.compression_level.bounds()
@@ -283,7 +283,7 @@ def test_compress_parameters(self):
283283
(r'Error when setting zstd compression parameter "window_log", '
284284
r'it should \d+ <= value <= \d+, provided value is 100\. '
285285
r'\(zstd v\d\.\d\.\d, (?:32|64)-bit build\)')):
286-
compress(b'', option)
286+
compress(b'', options=option)
287287

288288
def test_unknown_compression_parameter(self):
289289
KEY = 100001234
@@ -292,7 +292,7 @@ def test_unknown_compression_parameter(self):
292292
pattern = r'Zstd compression parameter.*?"unknown parameter \(key %d\)"' \
293293
% KEY
294294
with self.assertRaisesRegex(ZstdError, pattern):
295-
ZstdCompressor(option)
295+
ZstdCompressor(options=option)
296296

297297
@unittest.skipIf(not SUPPORT_MULTITHREADING,
298298
"zstd build doesn't support multi-threaded compression")
@@ -665,7 +665,7 @@ class DecompressorFlagsTestCase(unittest.TestCase):
665665
@classmethod
666666
def setUpClass(cls):
667667
options = {CParameter.checksum_flag:1}
668-
c = ZstdCompressor(options)
668+
c = ZstdCompressor(options=options)
669669

670670
cls.DECOMPRESSED_42 = b'a'*42
671671
cls.FRAME_42 = c.compress(cls.DECOMPRESSED_42, c.FLUSH_FRAME)

0 commit comments

Comments
 (0)