def create_store(): path = tempfile.mktemp(suffix='.lmdb') atexit_rmtree(path) try: store = LMDBStore(path) except ImportError: # pragma: no cover raise SkipTest('lmdb nod installed') return store, None
def create_array(read_only=False, **kwargs): path = mktemp(suffix='.lmdb') atexit_rmtree(path) try: store = LMDBStore(path, buffers=False) except ImportError: # pragma: no cover raise SkipTest('lmdb not installed') kwargs.setdefault('compressor', Zlib(1)) init_array(store, **kwargs) return Array(store, read_only=read_only)
def create_store(self): path = tempfile.mktemp(suffix='.lmdb') atexit.register(atexit_rmtree, path) if PY2: # pragma: py3 no cover # don't use buffers, otherwise would have to rewrite tests as bytes and # buffer don't compare equal in PY2 buffers = False else: # pragma: py2 no cover buffers = True store = LMDBStore(path, buffers=buffers) return store
def create_store(self): path = tempfile.mktemp(suffix='.lmdb') atexit_rmtree(path) if PY2: # pragma: py3 no cover # don't use buffers, otherwise would have to rewrite tests as bytes and # buffer don't compare equal in PY2 buffers = False else: # pragma: py2 no cover buffers = True try: store = LMDBStore(path, buffers=buffers) except ImportError: # pragma: no cover raise SkipTest('lmdb not installed') return store
def create_store(): path = tempfile.mktemp(suffix='.lmdb') atexit.register(atexit_rmtree, path) store = LMDBStore(path) return store, None
def create_store(): pytest.importorskip("lmdb") path = tempfile.mktemp(suffix='.lmdb') atexit.register(atexit_rmtree, path) store = LMDBStore(path) return store, None