Browse Source

[tests] Remove unused and duplicate imports

0.15
practicalswift 8 years ago
parent
commit
72163d4585
  1. 2
      contrib/testgen/gen_base58_test_vectors.py
  2. 1
      test/functional/import-rescan.py
  3. 5
      test/functional/segwit.py
  4. 3
      test/functional/smartfees.py
  5. 1
      test/functional/test_framework/socks5.py
  6. 1
      test/functional/test_framework/test_framework.py

2
contrib/testgen/gen_base58_test_vectors.py

@ -13,7 +13,7 @@ Usage:
# Released under MIT License # Released under MIT License
import os import os
from itertools import islice from itertools import islice
from base58 import b58encode, b58decode, b58encode_chk, b58decode_chk, b58chars from base58 import b58encode_chk, b58decode_chk, b58chars
import random import random
from binascii import b2a_hex from binascii import b2a_hex

1
test/functional/import-rescan.py

@ -22,7 +22,6 @@ happened previously.
from test_framework.authproxy import JSONRPCException from test_framework.authproxy import JSONRPCException
from test_framework.test_framework import BitcoinTestFramework from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (start_nodes, connect_nodes, sync_blocks, assert_equal, set_node_times) from test_framework.util import (start_nodes, connect_nodes, sync_blocks, assert_equal, set_node_times)
from decimal import Decimal
import collections import collections
import enum import enum

5
test/functional/segwit.py

@ -6,11 +6,10 @@
from test_framework.test_framework import BitcoinTestFramework from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import * from test_framework.util import *
from test_framework.mininode import sha256, ripemd160, CTransaction, CTxIn, COutPoint, CTxOut, COIN from test_framework.mininode import sha256, CTransaction, CTxIn, COutPoint, CTxOut, COIN, ToHex, FromHex
from test_framework.address import script_to_p2sh, key_to_p2pkh from test_framework.address import script_to_p2sh, key_to_p2pkh
from test_framework.script import CScript, OP_HASH160, OP_CHECKSIG, OP_0, hash160, OP_EQUAL, OP_DUP, OP_EQUALVERIFY, OP_1, OP_2, OP_CHECKMULTISIG, hash160, OP_TRUE from test_framework.script import CScript, OP_HASH160, OP_CHECKSIG, OP_0, hash160, OP_EQUAL, OP_DUP, OP_EQUALVERIFY, OP_1, OP_2, OP_CHECKMULTISIG, OP_TRUE
from io import BytesIO from io import BytesIO
from test_framework.mininode import ToHex, FromHex, COIN
NODE_0 = 0 NODE_0 = 0
NODE_1 = 1 NODE_1 = 1

3
test/functional/smartfees.py

@ -4,11 +4,10 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test fee estimation code.""" """Test fee estimation code."""
from collections import OrderedDict
from test_framework.test_framework import BitcoinTestFramework from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import * from test_framework.util import *
from test_framework.script import CScript, OP_1, OP_DROP, OP_2, OP_HASH160, OP_EQUAL, hash160, OP_TRUE from test_framework.script import CScript, OP_1, OP_DROP, OP_2, OP_HASH160, OP_EQUAL, hash160, OP_TRUE
from test_framework.mininode import CTransaction, CTxIn, CTxOut, COutPoint, ToHex, FromHex, COIN from test_framework.mininode import CTransaction, CTxIn, CTxOut, COutPoint, ToHex, COIN
# Construct 2 trivial P2SH's and the ScriptSigs that spend them # Construct 2 trivial P2SH's and the ScriptSigs that spend them
# So we can create many many transactions without needing to spend # So we can create many many transactions without needing to spend

1
test/functional/test_framework/socks5.py

@ -5,7 +5,6 @@
"""Dummy Socks5 server for testing.""" """Dummy Socks5 server for testing."""
import socket, threading, queue import socket, threading, queue
import traceback, sys
import logging import logging
logger = logging.getLogger("TestFramework.socks5") logger = logging.getLogger("TestFramework.socks5")

1
test/functional/test_framework/test_framework.py

@ -11,7 +11,6 @@ import sys
import shutil import shutil
import tempfile import tempfile
import time import time
import traceback
from .util import ( from .util import (
initialize_chain, initialize_chain,

Loading…
Cancel
Save