minor python3 refactors in non-core RPC test modules
This commit is contained in:
parent
9c2e494814
commit
74974eb14b
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
||||
|
@ -7,8 +7,6 @@
|
|||
|
||||
# Dependency: python-bitcoinrpc
|
||||
|
||||
import sys; assert sys.version_info < (3,), ur"This script does not run under Python 3. Please use Python 2.7.x."
|
||||
|
||||
from test_framework.util import assert_equal, check_json_precision, \
|
||||
initialize_chain, start_nodes, stop_nodes, wait_bitcoinds, \
|
||||
bitcoind_processes, rpc_port
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2017 The Zcash developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
||||
|
@ -13,8 +13,6 @@
|
|||
# - Archive the resulting /tmp/test###### directory
|
||||
#
|
||||
|
||||
import sys; assert sys.version_info < (3,), r"This script does not run under Python 3. Please use Python 2.7.x."
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_equal,
|
||||
|
@ -29,7 +27,7 @@ from decimal import Decimal
|
|||
class LargeWalletTest(BitcoinTestFramework):
|
||||
|
||||
def setup_chain(self):
|
||||
print(("Initializing test directory "+self.options.tmpdir))
|
||||
print("Initializing test directory "+self.options.tmpdir)
|
||||
initialize_chain_clean(self.options.tmpdir, 2)
|
||||
|
||||
def setup_network(self):
|
||||
|
@ -52,10 +50,10 @@ class LargeWalletTest(BitcoinTestFramework):
|
|||
|
||||
self.nodes[1].generate(1)
|
||||
self.sync_all()
|
||||
print(('Node 0: %d transactions, %d UTXOs' %
|
||||
(len(self.nodes[0].listtransactions()), len(self.nodes[0].listunspent()))))
|
||||
print(('Node 1: %d transactions, %d UTXOs' %
|
||||
(len(self.nodes[1].listtransactions()), len(self.nodes[1].listunspent()))))
|
||||
print('Node 0: %d transactions, %d UTXOs' %
|
||||
(len(self.nodes[0].listtransactions()), len(self.nodes[0].listunspent())))
|
||||
print('Node 1: %d transactions, %d UTXOs' %
|
||||
(len(self.nodes[1].listtransactions()), len(self.nodes[1].listunspent())))
|
||||
assert_equal(len(self.nodes[0].listunspent()), len(inputs))
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in New Issue