def create_store(self, **kwargs): ndbm = pytest.importorskip("dbm.ndbm") path = tempfile.mktemp(suffix=".ndbm") # pragma: no cover atexit.register(atexit_rmglob, path + "*") # pragma: no cover store = DBMStoreV3(path, flag="n", open=ndbm.open, **kwargs) # pragma: no cover return store # pragma: no cover
def create_store(self, **kwargs): path = tempfile.mktemp(suffix='.dumbdbm') atexit.register(atexit_rmglob, path + '*') import dbm.dumb as dumbdbm store = DBMStoreV3(path, flag='n', open=dumbdbm.open, **kwargs) return store
def create_store(self, dimension_separator=None): path = tempfile.mktemp(suffix='.anydbm') atexit.register(atexit_rmglob, path + '*') # create store using default dbm implementation store = DBMStoreV3(path, flag='n', dimension_separator=dimension_separator) return store
def create_store(self, **kwargs): gdbm = pytest.importorskip("dbm.gnu") path = tempfile.mktemp(suffix=".gdbm") # pragma: no cover atexit.register(os.remove, path) # pragma: no cover store = DBMStoreV3( path, flag="n", open=gdbm.open, write_lock=False, **kwargs ) # pragma: no cover return store # pragma: no cover
def create_store(self, **kwargs): bsddb3 = pytest.importorskip("bsddb3") path = tempfile.mktemp(suffix='.dbm') atexit.register(os.remove, path) store = DBMStoreV3(path, flag='n', open=bsddb3.btopen, write_lock=False, **kwargs) return store