Skip to content

Commit 1f5e7b7

Browse files
Use is_wasm to disable multiprocessing tests
1 parent 199928d commit 1f5e7b7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

numcodecs/tests/test_blosc.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
)
1616

1717

18-
from numcodecs.tests.common import (check_encode_decode,
18+
from numcodecs.tests.common import (is_wasm,
19+
check_encode_decode,
1920
check_encode_decode_partial,
2021
check_config,
2122
check_backwards_compatibility,
@@ -225,6 +226,10 @@ def _decode_worker(enc):
225226
return data
226227

227228

229+
@pytest.mark.skipif(
230+
is_wasm,
231+
reason="WASM/Pyodide does not support multiprocessing"
232+
)
228233
@pytest.mark.parametrize('pool', (Pool, ThreadPool))
229234
def test_multiprocessing(use_threads, pool):
230235
data = np.arange(1000000)

numcodecs/tests/test_shuffle.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
)
1515

1616

17-
from numcodecs.tests.common import (check_encode_decode,
17+
from numcodecs.tests.common import (is_wasm,
18+
check_encode_decode,
1819
check_config,
1920
check_backwards_compatibility)
2021

@@ -92,6 +93,10 @@ def _decode_worker(enc):
9293
return data
9394

9495

96+
@pytest.mark.skipif(
97+
is_wasm,
98+
reason="WASM/Pyodide does not support multiprocessing"
99+
)
95100
@pytest.mark.parametrize('pool', (Pool, ThreadPool))
96101
def test_multiprocessing(pool):
97102
data = np.arange(1000000)

0 commit comments

Comments
 (0)