]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-135166: Fix exception type expected by test.test_zstd (GH-135167)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 5 Jun 2025 17:41:51 +0000 (19:41 +0200)
committerGitHub <noreply@github.com>
Thu, 5 Jun 2025 17:41:51 +0000 (18:41 +0100)
gh-135166: Fix exception type expected by test.test_zstd (GH-135167)
(cherry picked from commit 1b55e12766d007aea9fcd0966e29ce220b67d28e)

Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
Lib/test/test_zstd.py

index 57de5eb6a5c735fe7e5b91c49d95cd5b21cae40a..7bd0ffd9391529d2e045ebebfec5b18d376330c8 100644 (file)
@@ -294,11 +294,11 @@ class CompressorTestCase(unittest.TestCase):
 
         # zstd lib doesn't support MT compression
         if not SUPPORT_MULTITHREADING:
-            with self.assertRaises(ZstdError):
+            with self.assertRaises(ValueError):
                 ZstdCompressor(options={CompressionParameter.nb_workers:4})
-            with self.assertRaises(ZstdError):
+            with self.assertRaises(ValueError):
                 ZstdCompressor(options={CompressionParameter.job_size:4})
-            with self.assertRaises(ZstdError):
+            with self.assertRaises(ValueError):
                 ZstdCompressor(options={CompressionParameter.overlap_log:4})
 
         # out of bounds error msg