Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_framework.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2014-2019 The Bitcoin Core developers | # Copyright (c) 2014-2019 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Base class for RPC testing.""" | """Base class for RPC testing.""" | ||||
import argparse | import argparse | ||||
import configparser | import configparser | ||||
from enum import Enum | |||||
import logging | import logging | ||||
import os | import os | ||||
import pdb | import pdb | ||||
import random | import random | ||||
import shutil | import shutil | ||||
import sys | import sys | ||||
import tempfile | import tempfile | ||||
import time | import time | ||||
from enum import Enum | |||||
from typing import Optional | from typing import Optional | ||||
from . import coverage | |||||
from .authproxy import JSONRPCException | from .authproxy import JSONRPCException | ||||
from .avatools import get_proof_ids | from .avatools import get_proof_ids | ||||
from . import coverage | |||||
from .p2p import NetworkThread | from .p2p import NetworkThread | ||||
from .test_node import TestNode | from .test_node import TestNode | ||||
from .util import ( | from .util import ( | ||||
MAX_NODES, | |||||
PortSeed, | |||||
assert_equal, | assert_equal, | ||||
check_json_precision, | check_json_precision, | ||||
connect_nodes, | connect_nodes, | ||||
disconnect_nodes, | disconnect_nodes, | ||||
get_datadir_path, | get_datadir_path, | ||||
initialize_datadir, | initialize_datadir, | ||||
MAX_NODES, | |||||
p2p_port, | p2p_port, | ||||
PortSeed, | |||||
rpc_port, | rpc_port, | ||||
wait_until_helper, | wait_until_helper, | ||||
) | ) | ||||
class TestStatus(Enum): | class TestStatus(Enum): | ||||
PASSED = 1 | PASSED = 1 | ||||
FAILED = 2 | FAILED = 2 | ||||
▲ Show 20 Lines • Show All 750 Lines • Show Last 20 Lines |