Skip to content

Commit f893085

Browse files
committed
[tests] Don't subclass from object for Python 3
1 parent 8f9e362 commit f893085

File tree

12 files changed

+60
-60
lines changed

12 files changed

+60
-60
lines changed

test/functional/p2p-fullblocktest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from test_framework.script import *
2121
import struct
2222

23-
class PreviousSpendableOutput(object):
23+
class PreviousSpendableOutput():
2424
def __init__(self, tx = CTransaction(), n = -1):
2525
self.tx = tx
2626
self.n = n # the output we're spending

test/functional/p2p-segwit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def test_witness_block(self, block, accepted, with_witness=True):
8989
assert_equal(self.connection.rpc.getbestblockhash() == block.hash, accepted)
9090

9191
# Used to keep track of anyone-can-spend outputs that we can use in the tests
92-
class UTXO(object):
92+
class UTXO():
9393
def __init__(self, sha256, n, nValue):
9494
self.sha256 = sha256
9595
self.n = n

test/functional/test_framework/authproxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def EncodeDecimal(o):
6262
return str(o)
6363
raise TypeError(repr(o) + " is not JSON serializable")
6464

65-
class AuthServiceProxy(object):
65+
class AuthServiceProxy():
6666
__id_count = 0
6767

6868
# ensure_ascii: escape unicode as \uXXXX, passed to json.dumps

test/functional/test_framework/blockstore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
logger = logging.getLogger("TestFramework.blockstore")
1212

13-
class BlockStore(object):
13+
class BlockStore():
1414
"""BlockStore helper class.
1515
1616
BlockStore keeps a map of blocks and implements helper functions for
@@ -127,7 +127,7 @@ def get_locator(self, current_tip=None):
127127
locator.vHave = r
128128
return locator
129129

130-
class TxStore(object):
130+
class TxStore():
131131
def __init__(self, datadir):
132132
self.txDB = dbmd.open(datadir + "/transactions", 'c')
133133

test/functional/test_framework/comptool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
global mininode_lock
2929

30-
class RejectResult(object):
30+
class RejectResult():
3131
"""Outcome that expects rejection of a transaction or block."""
3232
def __init__(self, code, reason=b''):
3333
self.code = code
@@ -156,13 +156,13 @@ def send_mempool(self):
156156
# across all connections. (If outcome of final tx is specified as true
157157
# or false, then only the last tx is tested against outcome.)
158158

159-
class TestInstance(object):
159+
class TestInstance():
160160
def __init__(self, objects=None, sync_every_block=True, sync_every_tx=False):
161161
self.blocks_and_transactions = objects if objects else []
162162
self.sync_every_block = sync_every_block
163163
self.sync_every_tx = sync_every_tx
164164

165-
class TestManager(object):
165+
class TestManager():
166166

167167
def __init__(self, testgen, datadir):
168168
self.test_generator = testgen

test/functional/test_framework/coverage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
REFERENCE_FILENAME = 'rpc_interface.txt'
1515

1616

17-
class AuthServiceProxyWrapper(object):
17+
class AuthServiceProxyWrapper():
1818
"""
1919
An object that wraps AuthServiceProxy to record specific RPC calls.
2020

test/functional/test_framework/key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def _check_result(val, func, args):
8484
ssl.EC_KEY_new_by_curve_name.restype = ctypes.c_void_p
8585
ssl.EC_KEY_new_by_curve_name.errcheck = _check_result
8686

87-
class CECKey(object):
87+
class CECKey():
8888
"""Wrapper around OpenSSL's EC_KEY"""
8989

9090
POINT_CONVERSION_COMPRESSED = 2

0 commit comments

Comments
 (0)