Skip to content

Commit a3ff73a

Browse files
Skip tests which use threading from stdlib
1 parent 7b53141 commit a3ff73a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

zarr/tests/test_sync.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import numpy as np
1010
from numpy.testing import assert_array_equal
11+
import pytest
1112

1213
from zarr.attrs import Attributes
1314
from zarr.core import Array
@@ -19,6 +20,7 @@
1920
from zarr.tests.test_attrs import TestAttributes, zarr_version # noqa
2021
from zarr.tests.test_core import TestArray
2122
from zarr.tests.test_hierarchy import TestGroup
23+
from zarr.tests.util import is_wasm
2224

2325

2426
class TestAttributesWithThreadSynchronizer(TestAttributes):
@@ -95,7 +97,7 @@ def test_parallel_append(self):
9597

9698
pool.terminate()
9799

98-
100+
@pytest.mark.skipif(is_wasm(), reason="No threading support in WASM/Pyodide")
99101
class TestArrayWithThreadSynchronizer(TestArray, MixinArraySyncTests):
100102
def create_array(self, read_only=False, **kwargs):
101103
store = KVStore(dict())
@@ -148,6 +150,7 @@ def test_hexdigest(self):
148150
assert "05b0663ffe1785f38d3a459dec17e57a18f254af" == z.hexdigest()
149151

150152

153+
@pytest.mark.skipif(is_wasm(), reason="No threading support in WASM/Pyodide")
151154
class TestArrayWithProcessSynchronizer(TestArray, MixinArraySyncTests):
152155
def create_array(self, read_only=False, **kwargs):
153156
path = tempfile.mkdtemp()
@@ -221,6 +224,7 @@ def _require_group(arg):
221224
return h.name
222225

223226

227+
@pytest.mark.skipif(is_wasm(), reason="No multiprocessing support in WASM/Pyodide")
224228
class MixinGroupSyncTests:
225229
def test_parallel_create_group(self):
226230
# setup
@@ -259,6 +263,7 @@ def test_parallel_require_group(self):
259263
pool.terminate()
260264

261265

266+
@pytest.mark.skipif(is_wasm(), reason="No threading support in WASM/Pyodide")
262267
class TestGroupWithThreadSynchronizer(TestGroup, MixinGroupSyncTests):
263268
def create_group(
264269
self, store=None, path=None, read_only=False, chunk_store=None, synchronizer=None
@@ -286,6 +291,7 @@ def test_synchronizer_property(self):
286291
assert isinstance(g.synchronizer, ThreadSynchronizer)
287292

288293

294+
@pytest.mark.skipif(is_wasm(), reason="No threading support in WASM/Pyodide")
289295
class TestGroupWithProcessSynchronizer(TestGroup, MixinGroupSyncTests):
290296
def create_store(self):
291297
path = tempfile.mkdtemp()

0 commit comments

Comments
 (0)