Skip to content

Commit

Permalink
Change from BitcoinTestFramework to BGLTestFramework
Browse files Browse the repository at this point in the history
janus committed Dec 28, 2023
1 parent 3c863d9 commit a509269
Showing 18 changed files with 35 additions and 38 deletions.
4 changes: 2 additions & 2 deletions test/functional/feature_fastprune.py
Original file line number Diff line number Diff line change
@@ -3,14 +3,14 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test fastprune mode."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.util import (
assert_equal
)
from test_framework.wallet import MiniWallet


class FeatureFastpruneTest(BitcoinTestFramework):
class FeatureFastpruneTest(BGLTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.extra_args = [["-fastprune"]]
4 changes: 2 additions & 2 deletions test/functional/feature_posix_fs_permissions.py
Original file line number Diff line number Diff line change
@@ -8,10 +8,10 @@
import os
import stat

from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework


class PosixFsPermissionsTest(BitcoinTestFramework):
class PosixFsPermissionsTest(BGLTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
4 changes: 2 additions & 2 deletions test/functional/feature_remove_pruned_files_on_startup.py
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@
"""Test removing undeleted pruned blk files on startup."""

import os
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework

class FeatureRemovePrunedFilesOnStartupTest(BitcoinTestFramework):
class FeatureRemovePrunedFilesOnStartupTest(BGLTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.extra_args = [["-fastprune", "-prune=1"]]
6 changes: 3 additions & 3 deletions test/functional/interface_usdt_mempool.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
from test_framework.blocktools import COINBASE_MATURITY
from test_framework.messages import COIN, DEFAULT_MEMPOOL_EXPIRY_HOURS
from test_framework.p2p import P2PDataStore
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.util import assert_equal
from test_framework.wallet import MiniWallet

@@ -122,14 +122,14 @@
"""


class MempoolTracepointTest(BitcoinTestFramework):
class MempoolTracepointTest(BGLTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.setup_clean_chain = True

def skip_test_if_missing_module(self):
self.skip_if_platform_not_linux()
self.skip_if_no_bitcoind_tracepoints()
self.skip_if_no_BGLd_tracepoints()
self.skip_if_no_python_bcc()
self.skip_if_no_bpf_permissions()

4 changes: 2 additions & 2 deletions test/functional/mempool_datacarrier.py
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
CScript,
OP_RETURN,
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.test_node import TestNode
from test_framework.util import (
assert_raises_rpc_error,
@@ -20,7 +20,7 @@
from test_framework.wallet import MiniWallet


class DataCarrierTest(BitcoinTestFramework):
class DataCarrierTest(BGLTestFramework):
def set_test_params(self):
self.num_nodes = 4
self.extra_args = [
4 changes: 2 additions & 2 deletions test/functional/mempool_dust.py
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
script_to_p2sh_script,
script_to_p2wsh_script,
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.test_node import TestNode
from test_framework.util import (
assert_equal,
@@ -37,7 +37,7 @@
DUST_RELAY_TX_FEE = 3000 # default setting [sat/kvB]


class DustRelayFeeTest(BitcoinTestFramework):
class DustRelayFeeTest(BGLTestFramework):
def set_test_params(self):
self.num_nodes = 1

4 changes: 2 additions & 2 deletions test/functional/mempool_sigoplimit.py
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
from test_framework.script_util import (
script_to_p2wsh_script,
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.util import (
assert_equal,
assert_greater_than,
@@ -39,7 +39,7 @@
DEFAULT_BYTES_PER_SIGOP = 20 # default setting


class BytesPerSigOpTest(BitcoinTestFramework):
class BytesPerSigOpTest(BGLTestFramework):
def set_test_params(self):
self.num_nodes = 1
# allow large datacarrier output to pad transactions
4 changes: 2 additions & 2 deletions test/functional/p2p_ibd_stalling.py
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
msg_headers,
P2PDataStore,
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.util import (
assert_equal,
)
@@ -44,7 +44,7 @@ def on_getheaders(self, message):
pass


class P2PIBDStallingTest(BitcoinTestFramework):
class P2PIBDStallingTest(BGLTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
4 changes: 2 additions & 2 deletions test/functional/p2p_net_deadlock.py
Original file line number Diff line number Diff line change
@@ -4,11 +4,11 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

import threading
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.util import random_bytes


class NetDeadlockTest(BitcoinTestFramework):
class NetDeadlockTest(BGLTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 2
4 changes: 2 additions & 2 deletions test/functional/p2p_orphan_handling.py
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
from test_framework.util import (
assert_equal,
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.wallet import (
MiniWallet,
MiniWalletMode,
@@ -108,7 +108,7 @@ def assert_never_requested(self, txhash):
for request in getdata.inv:
assert request.hash != txhash

class OrphanHandlingTest(BitcoinTestFramework):
class OrphanHandlingTest(BGLTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.extra_args = [[]]
4 changes: 2 additions & 2 deletions test/functional/p2p_sendtxrcncl.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
P2P_SUBVERSION,
P2P_VERSION,
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.util import assert_equal

class PeerNoVerack(P2PInterface):
@@ -61,7 +61,7 @@ def create_sendtxrcncl_msg():
sendtxrcncl_msg.salt = 2
return sendtxrcncl_msg

class SendTxRcnclTest(BitcoinTestFramework):
class SendTxRcnclTest(BGLTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.extra_args = [['-txreconciliation']]
4 changes: 2 additions & 2 deletions test/functional/p2p_tx_privacy.py
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
from test_framework.p2p import (
P2PInterface,
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.wallet import MiniWallet

class P2PTxSpy(P2PInterface):
@@ -47,7 +47,7 @@ def on_inv(self, message):
def wait_for_inv_match(self, expected_inv):
self.wait_until(lambda: len(self.all_invs) == 1 and self.all_invs[0] == expected_inv)

class TxPrivacyTest(BitcoinTestFramework):
class TxPrivacyTest(BGLTestFramework):
def set_test_params(self):
self.num_nodes = 1

4 changes: 2 additions & 2 deletions test/functional/rpc_validateaddress.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test validateaddress for main chain"""

from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework

from test_framework.util import assert_equal

@@ -169,7 +169,7 @@
]


class ValidateAddressMainTest(BitcoinTestFramework):
class ValidateAddressMainTest(BGLTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.chain = "" # main
1 change: 1 addition & 0 deletions test/functional/test_framework/address.py
Original file line number Diff line number Diff line change
@@ -81,6 +81,7 @@ def base58_to_byte(s):
if not s:
return b''
n = 0
print(s)
for c in s:
n *= 58
assert c in b58chars
6 changes: 1 addition & 5 deletions test/functional/wallet_basic.py
Original file line number Diff line number Diff line change
@@ -8,15 +8,11 @@

from test_framework.blocktools import COINBASE_MATURITY
from test_framework.descriptors import descsum_create
<<<<<<< HEAD
from test_framework.test_framework import BGLTestFramework
=======
from test_framework.messages import (
COIN,
DEFAULT_ANCESTOR_LIMIT,
)
from test_framework.test_framework import BitcoinTestFramework
>>>>>>> ffffe622e9... test: Move test_chain_listunspent wallet check from mempool_packages to wallet_basic
from test_framework.test_framework import BGLTestFramework
from test_framework.util import (
assert_array_result,
assert_equal,
4 changes: 2 additions & 2 deletions test/functional/wallet_blank.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

import os

from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.address import (
ADDRESS_BCRT1_UNSPENDABLE,
ADDRESS_BCRT1_UNSPENDABLE_DESCRIPTOR,
@@ -16,7 +16,7 @@
from test_framework.wallet_util import generate_keypair


class WalletBlankTest(BitcoinTestFramework):
class WalletBlankTest(BGLTestFramework):
def set_test_params(self):
self.num_nodes = 1

4 changes: 2 additions & 2 deletions test/functional/wallet_change_address.py
Original file line number Diff line number Diff line change
@@ -7,13 +7,13 @@
import re

from test_framework.blocktools import COINBASE_MATURITY
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.util import (
assert_equal,
)


class WalletChangeAddressTest(BitcoinTestFramework):
class WalletChangeAddressTest(BGLTestFramework):
def add_options(self, parser):
self.add_wallet_options(parser)

4 changes: 2 additions & 2 deletions test/functional/wallet_conflicts.py
Original file line number Diff line number Diff line change
@@ -9,12 +9,12 @@

from decimal import Decimal

from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_framework import BGLTestFramework
from test_framework.util import (
assert_equal,
)

class TxConflicts(BitcoinTestFramework):
class TxConflicts(BGLTestFramework):
def add_options(self, parser):
self.add_wallet_options(parser)

0 comments on commit a509269

Please sign in to comment.