diff --git a/test/functional/rpc_bind.py b/test/functional/rpc_bind.py --- a/test/functional/rpc_bind.py +++ b/test/functional/rpc_bind.py @@ -26,7 +26,7 @@ then try to connect, and check if the set of bound addresses matches the expected set. ''' - self.log.info("Bind test for %s" % str(addresses)) + self.log.info("Bind test for {}".format(str(addresses))) expected = [(addr_to_hex(addr), port) for (addr, port) in expected] base_args = ['-disablewallet', '-nolisten'] if allow_ips: @@ -49,7 +49,7 @@ Start a node with rpcallow IP, and request getnetworkinfo at a non-localhost IP. ''' - self.log.info("Allow IP test for %s:%d" % (rpchost, rpcport)) + self.log.info("Allow IP test for {}:{}".format(rpchost, rpcport)) base_args = ['-disablewallet', '-nolisten'] + \ ['-rpcallowip=' + x for x in allow_ips] self.nodes[0].host = None @@ -90,7 +90,7 @@ except OSError: raise SkipTest("This test requires IPv6 support.") - self.log.info("Using interface %s for testing" % non_loopback_ip) + self.log.info("Using interface {} for testing".format(non_loopback_ip)) defaultport = rpc_port(0) diff --git a/test/functional/rpc_invalidateblock.py b/test/functional/rpc_invalidateblock.py --- a/test/functional/rpc_invalidateblock.py +++ b/test/functional/rpc_invalidateblock.py @@ -45,7 +45,7 @@ newhash = self.nodes[0].getbestblockhash() if (newheight != 4 or newhash != besthash): raise AssertionError( - "Wrong tip for node0, hash %s, height %d" % (newhash, newheight)) + "Wrong tip for node0, hash {}, height {}".format(newhash, newheight)) self.log.info("\nMake sure we won't reorg to a lower work chain:") connect_nodes_bi(self.nodes[1], self.nodes[2]) @@ -67,7 +67,7 @@ node1height = self.nodes[1].getblockcount() if node1height < 4: raise AssertionError( - "Node 1 reorged to a lower height: %d" % node1height) + "Node 1 reorged to a lower height: {}".format(node1height)) if __name__ == '__main__':