Work towards getting RPC tests working again
So much has changed since I originally got the RPC tests working many years ago, most notably modern Linux distros don't even have a way to install python2 via packages, you have to install from source. Continuing with python2 does not seem like a good idea, so we begin migrating thigns to Python 3. Currently running ./test.sh will successfully spin up a test chain but then the test suite crashes when attempting to send an RPC request, which looks to be caused by the test suite internals still expecting python2.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python2
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2016-2024 The Hush developers
|
||||
# Copyright (c) 2018 SuperNET developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
@@ -39,13 +39,10 @@ class AssetChainPrivateTest (BitcoinTestFramework):
|
||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir,
|
||||
extra_args=[[
|
||||
# always give -ac_name as first extra_arg and port as third
|
||||
'-ac_name=REGTEST',
|
||||
'-conf='+self.options.tmpdir+'/node0/REGTEST.conf',
|
||||
'-ac_name=ZZZ',
|
||||
'-conf='+self.options.tmpdir+'/node0/ZZZ.conf',
|
||||
'-port=64367',
|
||||
'-rpcport=64368',
|
||||
'-regtest',
|
||||
'-addressindex=1',
|
||||
'-spentindex=1',
|
||||
'-ac_supply=0',
|
||||
'-ac_reward=25600000000',
|
||||
'-ac_private=1',
|
||||
@@ -78,7 +75,7 @@ class AssetChainPrivateTest (BitcoinTestFramework):
|
||||
rpc.getwalletinfo()
|
||||
|
||||
taddr = rpc.getnewaddress()
|
||||
print "Sending to " + taddr
|
||||
print("Sending to " + taddr)
|
||||
# sending to arbitrary non-notary transparent address is not allowed
|
||||
assert_raises(JSONRPCException, rpc.sendtoaddress, taddr,1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user