From 5c9d7053017f463193b9b5aa9dfb036f1844d697 Mon Sep 17 00:00:00 2001 From: "MMGen@trixie" Date: Wed, 1 Oct 2025 15:26:41 +0000 Subject: [PATCH] test suite: lint, whitespace --- test/cmdtest_d/main.py | 2 +- test/cmdtest_d/misc.py | 4 ++-- test/cmdtest_d/regtest.py | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/cmdtest_d/main.py b/test/cmdtest_d/main.py index 6e35b7d..f1881f8 100755 --- a/test/cmdtest_d/main.py +++ b/test/cmdtest_d/main.py @@ -41,7 +41,7 @@ class CmdTestMain(CmdTestBase): def peerblocks(self,args,expect_list=None,pexpect_spawn=False): t = self.spawn( - f'mmnode-peerblocks', + 'mmnode-peerblocks', args, pexpect_spawn = pexpect_spawn ) if cfg.exact_output: # disable echoing of input diff --git a/test/cmdtest_d/misc.py b/test/cmdtest_d/misc.py index 1a8175e..8a39462 100755 --- a/test/cmdtest_d/misc.py +++ b/test/cmdtest_d/misc.py @@ -32,7 +32,7 @@ class CmdTestHelp(CmdTestBase): color = True def version(self): - t = self.spawn(f'mmnode-netrate',['--version']) + t = self.spawn('mmnode-netrate', ['--version']) t.expect('MMNODE-NETRATE version') return t @@ -108,7 +108,7 @@ class CmdTestScripts(CmdTestBase): def ticker(self, args=[], expect_list=None, cached=True, exit_val=None): t = self.spawn( - f'mmnode-ticker', + 'mmnode-ticker', (['--cached-data'] if cached else []) + self.ticker_args + args, exit_val = exit_val) if expect_list: diff --git a/test/cmdtest_d/regtest.py b/test/cmdtest_d/regtest.py index 3b77836..4792dee 100755 --- a/test/cmdtest_d/regtest.py +++ b/test/cmdtest_d/regtest.py @@ -107,7 +107,7 @@ class CmdTestRegtest(CmdTestBase): def __init__(self, cfg, trunner, cfgs, spawn): CmdTestBase.__init__(self, cfg, trunner, cfgs, spawn) - if trunner == None: + if trunner is None: return if cfg._proto.testnet: die(2,'--testnet and --regtest options incompatible with regtest test suite') @@ -328,7 +328,7 @@ class CmdTestRegtest(CmdTestBase): async def do_tx(inputs,outputs,wif): tx_hex = await r.rpc_call( 'createrawtransaction', inputs, outputs ) tx = await r.rpc_call( 'signrawtransactionwithkey', tx_hex, [wif], [], self.proto.sighash_type ) - assert tx['complete'] == True + assert tx['complete'] return tx['hex'] async def do_tx1(): @@ -371,13 +371,13 @@ class CmdTestRegtest(CmdTestBase): imsg(f'Creating funding transaction with {nTxs} outputs of value {tx1_amt} {self.proto.coin}') tx1_hex = await do_tx1() - imsg(f'Relaying funding transaction') + imsg('Relaying funding transaction') await r.rpc_call('sendrawtransaction',tx1_hex) - imsg(f'Mining a block') + imsg('Mining a block') await r.generate(1,silent=True) - imsg(f'Generating fees for mempool transactions') + imsg('Generating fees for mempool transactions') fees = list(gen_fees(nTxs,2,120)) imsg(f'Creating and relaying {nTxs} mempool transactions with {nPairs} outputs each')