Skip to content

Commit 64937fe

Browse files
committed
[QA] restructure rpc tests directory
* move non-test classes to subdir `test-framework`
1 parent 26e08a1 commit 64937fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+71
-88
lines changed

qa/rpc-tests/bipdersig-p2p.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
#
66

7-
from test_framework import ComparisonTestFramework
8-
from util import *
9-
from mininode import CTransaction, NetworkThread
10-
from blocktools import create_coinbase, create_block
7+
from test_framework.test_framework import ComparisonTestFramework
8+
from test_framework.util import *
9+
from test_framework.mininode import CTransaction, NetworkThread
10+
from test_framework.blocktools import create_coinbase, create_block
11+
from test_framework.comptool import TestInstance, TestManager
12+
from test_framework.script import CScript
1113
from binascii import hexlify, unhexlify
1214
import cStringIO
13-
from comptool import TestInstance, TestManager
14-
from script import CScript
1515
import time
1616

1717
# A canonical signature consists of:

qa/rpc-tests/bipdersig.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
# Test the BIP66 changeover logic
88
#
99

10-
from test_framework import BitcoinTestFramework
11-
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
12-
from util import *
10+
from test_framework.test_framework import BitcoinTestFramework
11+
from test_framework.util import *
1312
import os
1413
import shutil
1514

qa/rpc-tests/forknotify.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
# Test -alertnotify
88
#
99

10-
from test_framework import BitcoinTestFramework
11-
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
12-
from util import *
10+
from test_framework.test_framework import BitcoinTestFramework
11+
from test_framework.util import *
1312
import os
1413
import shutil
1514

qa/rpc-tests/getblocktemplate_longpoll.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

6-
from test_framework import BitcoinTestFramework
7-
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
8-
from util import *
6+
from test_framework.test_framework import BitcoinTestFramework
7+
from test_framework.util import *
98

109

1110
def check_array_result(object_array, to_match, expected):

qa/rpc-tests/getblocktemplate_proposals.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

6-
from test_framework import BitcoinTestFramework
7-
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
8-
from util import *
6+
from test_framework.test_framework import BitcoinTestFramework
7+
from test_framework.util import *
98

109
from binascii import a2b_hex, b2a_hex
1110
from hashlib import sha256

qa/rpc-tests/getchaintips.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# on chains of different lengths, and join the network together again.
88
# This gives us two tips, verify that it works.
99

10-
from test_framework import BitcoinTestFramework
11-
from util import assert_equal
10+
from test_framework.test_framework import BitcoinTestFramework
11+
from test_framework.util import assert_equal
1212

1313
class GetChainTipsTest (BitcoinTestFramework):
1414

qa/rpc-tests/httpbasics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# Test REST interface
88
#
99

10-
from test_framework import BitcoinTestFramework
11-
from util import *
10+
from test_framework.test_framework import BitcoinTestFramework
11+
from test_framework.util import *
1212
import base64
1313

1414
try:

qa/rpc-tests/invalidateblock.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
# Test InvalidateBlock code
88
#
99

10-
from test_framework import BitcoinTestFramework
11-
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
12-
from util import *
10+
from test_framework.test_framework import BitcoinTestFramework
11+
from test_framework.util import *
1312

1413
class InvalidateTest(BitcoinTestFramework):
1514

qa/rpc-tests/invalidblockrequest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
#
66

7-
from test_framework import ComparisonTestFramework
8-
from util import *
9-
from comptool import TestManager, TestInstance
10-
from mininode import *
11-
from blocktools import *
7+
from test_framework.test_framework import ComparisonTestFramework
8+
from test_framework.util import *
9+
from test_framework.comptool import TestManager, TestInstance
10+
from test_framework.mininode import *
11+
from test_framework.blocktools import *
1212
import logging
1313
import copy
1414
import time

qa/rpc-tests/keypool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Add python-bitcoinrpc to module search path:
99
import os
1010
import sys
11-
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
11+
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_framework/python-bitcoinrpc"))
1212

1313
import json
1414
import shutil
@@ -17,7 +17,7 @@
1717
import traceback
1818

1919
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
20-
from util import *
20+
from test_framework.util import *
2121

2222

2323
def check_array_result(object_array, to_match, expected):

0 commit comments

Comments
 (0)