Skip to content

Commit

Permalink
Fix test_core.py 'compile' issues
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmoore committed Feb 14, 2024
1 parent 3092f42 commit 1e756c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zarr/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
from zarr.tests.util import (
abs_container,
have_bsddb3,
have_fsspec,
have_lmdb,
have_sqlite3,
mktemp,
Expand Down Expand Up @@ -2048,6 +2049,7 @@ def test_nbytes_stored(self):
@pytest.mark.skipif(have_bsddb3 is False, reason="needs bsddb3")
class TestArrayWithDBMStoreBerkeleyDB(TestArray):
def create_store(self):
import bsddb3
path = mktemp(suffix=".dbm")
atexit.register(os.remove, path)
store = DBMStore(path, flag="n", open=bsddb3.btopen)
Expand Down Expand Up @@ -2768,6 +2770,7 @@ def test_nbytes_stored(self):
@pytest.mark.skipif(have_bsddb3 is False, reason="needs bsddb3")
class TestArrayWithDBMStoreV3BerkeleyDB(TestArrayV3):
def create_store(self) -> DBMStoreV3:
import bsddb3
path = mktemp(suffix=".dbm")
atexit.register(os.remove, path)
store = DBMStoreV3(path, flag="n", open=bsddb3.btopen)
Expand Down

0 comments on commit 1e756c6

Please sign in to comment.