Skip to content

Commit

Permalink
Skip tests that require dbm
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed May 27, 2024
1 parent 621077a commit 7ae9a97
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/v2/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
from zarr.v2.util import buffer_size
from .util import abs_container, skip_test_env_var, have_fsspec, mktemp

from tests._shared import IS_WASM

# noinspection PyMethodMayBeStatic


Expand Down Expand Up @@ -1992,6 +1994,7 @@ def create_store(self):
return store


@pytest.mark.skipif(IS_WASM, reason="no dbm support in WASM")
class TestArrayWithDBMStore(TestArray):
def create_store(self):
path = mktemp(suffix=".anydbm")
Expand All @@ -2003,6 +2006,7 @@ def test_nbytes_stored(self):
pass # not implemented


@pytest.mark.skipif(IS_WASM, reason="no dbm support in WASM")
@pytest.mark.skip(reason="can't get bsddb3 to work on CI right now")
class TestArrayWithDBMStoreBerkeleyDB(TestArray):
def create_store(self):
Expand Down
4 changes: 4 additions & 0 deletions tests/v2/test_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
from zarr.v2.util import InfoReporter
from .util import skip_test_env_var, have_fsspec, abs_container, mktemp

from tests._shared import IS_WASM

# noinspection PyStatementEffect


Expand Down Expand Up @@ -1122,6 +1124,7 @@ def test_move(self):
pass


@pytest.mark.skipif(IS_WASM, reason="dbm not available in WASM")
class TestGroupWithDBMStore(TestGroup):
@staticmethod
def create_store():
Expand All @@ -1131,6 +1134,7 @@ def create_store():
return store, None


@pytest.mark.skipif(IS_WASM, reason="dbm not available in WASM")
class TestGroupWithDBMStoreBerkeleyDB(TestGroup):
@staticmethod
def create_store():
Expand Down
3 changes: 3 additions & 0 deletions tests/v2/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
from .util import CountingDict, have_fsspec, skip_test_env_var, abs_container, mktemp
from zarr.v2.util import ConstantMap, json_dumps

from tests._shared import IS_WASM

@contextmanager
def does_not_raise():
Expand Down Expand Up @@ -1765,6 +1766,7 @@ def test_store_and_retrieve_ndarray(self):
assert np.array_equiv(y, x)


@pytest.mark.skipif(IS_WASM, reason="dbm not available in WASM")
class TestDBMStore(StoreTests):
def create_store(self, dimension_separator=None):
path = mktemp(suffix=".anydbm")
Expand All @@ -1780,6 +1782,7 @@ def test_context_manager(self):
assert 2 == len(store)


@pytest.mark.skipif(IS_WASM, reason="dbm not available in WASM")
class TestDBMStoreDumb(TestDBMStore):
def create_store(self, **kwargs):
path = mktemp(suffix=".dumbdbm")
Expand Down

0 comments on commit 7ae9a97

Please sign in to comment.