File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -854,6 +854,13 @@ def skip_if_no_py3_zmq(self):
854854 except ImportError :
855855 raise SkipTest ("python3-zmq module not available." )
856856
857+ def skip_if_no_py_sqlite3 (self ):
858+ """Attempt to import the sqlite3 package and skip the test if the import fails."""
859+ try :
860+ import sqlite3 # noqa
861+ except ImportError :
862+ raise SkipTest ("sqlite3 module not available." )
863+
857864 def skip_if_no_python_bcc (self ):
858865 """Attempt to import the bcc package and skip the tests if the import fails."""
859866 try :
Original file line number Diff line number Diff line change 44# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55"""Test descriptor wallet function."""
66import os
7- import sqlite3
7+
8+ try :
9+ import sqlite3
10+ except ImportError :
11+ pass
812
913from test_framework .blocktools import COINBASE_MATURITY
1014from test_framework .test_framework import BitcoinTestFramework
@@ -27,6 +31,7 @@ def set_test_params(self):
2731 def skip_test_if_missing_module (self ):
2832 self .skip_if_no_wallet ()
2933 self .skip_if_no_sqlite ()
34+ self .skip_if_no_py_sqlite3 ()
3035
3136 def run_test (self ):
3237 if self .is_bdb_compiled ():
You can’t perform that action at this time.
0 commit comments