From be11ba36bb2d018698f7c174fd34cff2c9ca30ed Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Wed, 21 Aug 2024 07:58:48 +0200 Subject: [PATCH] fix imports --- ostap/io/tests/test_io_dbases.py | 9 ++++++--- ostap/io/tests/test_io_shelves.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ostap/io/tests/test_io_dbases.py b/ostap/io/tests/test_io_dbases.py index c1e32290..9a41be30 100644 --- a/ostap/io/tests/test_io_dbases.py +++ b/ostap/io/tests/test_io_dbases.py @@ -36,14 +36,16 @@ def the_name (): # ============================================================================ try : - from ostap.io.lmdbdict import LmdbDict + import lbdb + from ostap.io.lmdbdict import lbdb, LmdbDict item = 'LmdbDict' , CleanUp.tempdir ( prefix = 'ostap-LMDB-' ) , LmdbDict - dbases.append ( item ) + dbases.append ( item ) except ImportError: logger.warning ( 'LmdbDict is not accessible!' ) # ============================================================================ try : + import berkeleydb from ostap.io.dbase import berkeleydb_open item = 'BerkeleyDB' , CleanUp.tempfile ( prefix = 'ostap-BerkeleyDB-' , suffix = '.db' ) , berkeleydb_open dbases.append ( item ) @@ -52,7 +54,8 @@ def the_name (): # ============================================================================ try : - from ostap.io.dbase import bdsdb3_open + import bsddb3 + from ostap.io.dbase import bsddb3_open item = 'BSDDB3' , CleanUp.tempfile ( prefix = 'ostap-BSDDB3-' , suffix = '.db' ) , bsbdb3_open dbases.append ( item ) except ImportError: diff --git a/ostap/io/tests/test_io_shelves.py b/ostap/io/tests/test_io_shelves.py index 4bf38fcc..8c543508 100755 --- a/ostap/io/tests/test_io_shelves.py +++ b/ostap/io/tests/test_io_shelves.py @@ -49,7 +49,7 @@ else : lzshelve = None # ============================================================================= -if (3,6) <= python_version : +if (3,6) <= python_version : import ostap.io.zstshelve as zstshelve try : import zstandard