Skip to content

Commit 2b2cf81

Browse files
[3.14] gh-136315: Fix skipped multithreading test in test_zstd (GH-136320) (#136322)
gh-136315: Fix skipped multithreading test in test_zstd (GH-136320) Fix skipped test in test_zstd (cherry picked from commit 5dac137) Co-authored-by: Emma Smith <emma@emmatyping.dev>
1 parent 53584d3 commit 2b2cf81

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Lib/test/test_zstd.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,18 @@
6363

6464
TRAINED_DICT = None
6565

66-
SUPPORT_MULTITHREADING = False
66+
# Cannot be deferred to setup as it is used to check whether or not to skip
67+
# tests
68+
try:
69+
SUPPORT_MULTITHREADING = CompressionParameter.nb_workers.bounds() != (0, 0)
70+
except Exception:
71+
SUPPORT_MULTITHREADING = False
6772

6873
C_INT_MIN = -(2**31)
6974
C_INT_MAX = (2**31) - 1
7075

7176

7277
def setUpModule():
73-
global SUPPORT_MULTITHREADING
74-
SUPPORT_MULTITHREADING = CompressionParameter.nb_workers.bounds() != (0, 0)
7578
# uncompressed size 130KB, more than a zstd block.
7679
# with a frame epilogue, 4 bytes checksum.
7780
global DAT_130K_D

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy