|
8 | 8 |
|
9 | 9 | import numpy as np
|
10 | 10 | from numpy.testing import assert_array_equal
|
| 11 | +import pytest |
11 | 12 |
|
12 | 13 | from zarr.attrs import Attributes
|
13 | 14 | from zarr.core import Array
|
|
19 | 20 | from zarr.tests.test_attrs import TestAttributes, zarr_version # noqa
|
20 | 21 | from zarr.tests.test_core import TestArray
|
21 | 22 | from zarr.tests.test_hierarchy import TestGroup
|
| 23 | +from zarr.tests.util import is_wasm |
22 | 24 |
|
23 | 25 |
|
24 | 26 | class TestAttributesWithThreadSynchronizer(TestAttributes):
|
@@ -95,7 +97,7 @@ def test_parallel_append(self):
|
95 | 97 |
|
96 | 98 | pool.terminate()
|
97 | 99 |
|
98 |
| - |
| 100 | +@pytest.mark.skipif(is_wasm(), reason="No threading support in WASM/Pyodide") |
99 | 101 | class TestArrayWithThreadSynchronizer(TestArray, MixinArraySyncTests):
|
100 | 102 | def create_array(self, read_only=False, **kwargs):
|
101 | 103 | store = KVStore(dict())
|
@@ -148,6 +150,7 @@ def test_hexdigest(self):
|
148 | 150 | assert "05b0663ffe1785f38d3a459dec17e57a18f254af" == z.hexdigest()
|
149 | 151 |
|
150 | 152 |
|
| 153 | +@pytest.mark.skipif(is_wasm(), reason="No threading support in WASM/Pyodide") |
151 | 154 | class TestArrayWithProcessSynchronizer(TestArray, MixinArraySyncTests):
|
152 | 155 | def create_array(self, read_only=False, **kwargs):
|
153 | 156 | path = tempfile.mkdtemp()
|
@@ -221,6 +224,7 @@ def _require_group(arg):
|
221 | 224 | return h.name
|
222 | 225 |
|
223 | 226 |
|
| 227 | +@pytest.mark.skipif(is_wasm(), reason="No multiprocessing support in WASM/Pyodide") |
224 | 228 | class MixinGroupSyncTests:
|
225 | 229 | def test_parallel_create_group(self):
|
226 | 230 | # setup
|
@@ -259,6 +263,7 @@ def test_parallel_require_group(self):
|
259 | 263 | pool.terminate()
|
260 | 264 |
|
261 | 265 |
|
| 266 | +@pytest.mark.skipif(is_wasm(), reason="No threading support in WASM/Pyodide") |
262 | 267 | class TestGroupWithThreadSynchronizer(TestGroup, MixinGroupSyncTests):
|
263 | 268 | def create_group(
|
264 | 269 | self, store=None, path=None, read_only=False, chunk_store=None, synchronizer=None
|
@@ -286,6 +291,7 @@ def test_synchronizer_property(self):
|
286 | 291 | assert isinstance(g.synchronizer, ThreadSynchronizer)
|
287 | 292 |
|
288 | 293 |
|
| 294 | +@pytest.mark.skipif(is_wasm(), reason="No threading support in WASM/Pyodide") |
289 | 295 | class TestGroupWithProcessSynchronizer(TestGroup, MixinGroupSyncTests):
|
290 | 296 | def create_store(self):
|
291 | 297 | path = tempfile.mkdtemp()
|
|
0 commit comments