mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 04:12:36 -03:00
Merge bitcoin/bitcoin#26882: test: skip sqlite3 tests if it isn't available
eea73d465e
test: skip sqlite3 tests if it isn't available (fanquake) Pull request description: Fixes #26819. Related too #26873, which adds the missing documentation. ACKs for top commit: brunoerg: ACKeea73d465e
Tree-SHA512: 9bcf5c642695c39a58d56ef8bf4d62601ab0acd4ad71c9400b9d8a2a336a1cd55b69408a02c583d9a67c5de0286364c9f38debd03ec8316725ad69450d980f0d
This commit is contained in:
commit
32834034a3
2 changed files with 13 additions and 1 deletions
|
@ -854,6 +854,13 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
|||
except ImportError:
|
||||
raise SkipTest("python3-zmq module not available.")
|
||||
|
||||
def skip_if_no_py_sqlite3(self):
|
||||
"""Attempt to import the sqlite3 package and skip the test if the import fails."""
|
||||
try:
|
||||
import sqlite3 # noqa
|
||||
except ImportError:
|
||||
raise SkipTest("sqlite3 module not available.")
|
||||
|
||||
def skip_if_no_python_bcc(self):
|
||||
"""Attempt to import the bcc package and skip the tests if the import fails."""
|
||||
try:
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Test descriptor wallet function."""
|
||||
import os
|
||||
import sqlite3
|
||||
|
||||
try:
|
||||
import sqlite3
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
from test_framework.blocktools import COINBASE_MATURITY
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
|
@ -27,6 +31,7 @@ class WalletDescriptorTest(BitcoinTestFramework):
|
|||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
self.skip_if_no_sqlite()
|
||||
self.skip_if_no_py_sqlite3()
|
||||
|
||||
def run_test(self):
|
||||
if self.is_bdb_compiled():
|
||||
|
|
Loading…
Reference in a new issue