Visitar URL original
Restore Lib/test/test_zstd.py to its vendored CPython state · RustPython/RustPython@041f631 · GitHub
Skip to content

Commit 041f631

Browse files
Restore Lib/test/test_zstd.py to its vendored CPython state
The branch dropped the `skipIf(not SUPPORT_MULTITHREADING)` guard from `test_zstd_multithread_compress`. That guard can never fire against this backend: libzstd-rs-sys compiles multi-threaded compression in unconditionally — its Cargo.toml has no `zstdmt`-style feature — so `CompressionParameter.nb_workers.bounds()` is never `(0, 0)` and `SUPPORT_MULTITHREADING` is always true. Removing the decorator therefore changed nothing except to put a modification of a vendored CPython test in the diff, and it would turn into a hard failure rather than a skip if a future backend ever lacked multi-threading. Restore the file so the PR touches no CPython test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent e163561 commit 041f631

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎Lib/test/test_zstd.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ def test_unknown_compression_parameter(self):
321321
with self.assertRaisesRegex(ValueError, pattern):
322322
ZstdCompressor(options=option)
323323

324+
@unittest.skipIf(not SUPPORT_MULTITHREADING,
325+
"zstd build doesn't support multi-threaded compression")
324326
def test_zstd_multithread_compress(self):
325327
size = 40*_1M
326328
b = THIS_FILE_BYTES * (size // len(THIS_FILE_BYTES))

0 commit comments

Comments
 (0)