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):
854
854
except ImportError :
855
855
raise SkipTest ("python3-zmq module not available." )
856
856
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
+
857
864
def skip_if_no_python_bcc (self ):
858
865
"""Attempt to import the bcc package and skip the tests if the import fails."""
859
866
try :
Original file line number Diff line number Diff line change 4
4
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
"""Test descriptor wallet function."""
6
6
import os
7
- import sqlite3
7
+
8
+ try :
9
+ import sqlite3
10
+ except ImportError :
11
+ pass
8
12
9
13
from test_framework .blocktools import COINBASE_MATURITY
10
14
from test_framework .test_framework import BitcoinTestFramework
@@ -27,6 +31,7 @@ def set_test_params(self):
27
31
def skip_test_if_missing_module (self ):
28
32
self .skip_if_no_wallet ()
29
33
self .skip_if_no_sqlite ()
34
+ self .skip_if_no_py_sqlite3 ()
30
35
31
36
def run_test (self ):
32
37
if self .is_bdb_compiled ():
You can’t perform that action at this time.
0 commit comments