Browse Source

test suite: lint, whitespace

MMGen@trixie 2 months ago
parent
commit
5c9d705301
3 changed files with 8 additions and 8 deletions
  1. 1 1
      test/cmdtest_d/main.py
  2. 2 2
      test/cmdtest_d/misc.py
  3. 5 5
      test/cmdtest_d/regtest.py

+ 1 - 1
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

+ 2 - 2
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:

+ 5 - 5
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')