test.py: minor fixes

This commit is contained in:
The MMGen Project 2021-10-10 20:18:16 +00:00
commit 53145cbc9f
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 4 additions and 15 deletions

View file

@ -10,9 +10,9 @@ cf_usr = cfg_file('usr')
cf_sys = cfg_file('sys')
cf_sample = cfg_file('sample')
msg(f'Usr cfg file: {cf_usr.fn}')
msg(f'Sys cfg file: {cf_sys.fn}')
msg(f'Sample cfg file: {cf_sample.fn}')
msg(f'Usr cfg file: {os.path.relpath(cf_usr.fn)}')
msg(f'Sys cfg file: {os.path.relpath(cf_sys.fn)}')
msg(f'Sample cfg file: {os.path.relpath(cf_sample.fn)}')
if cmd_args:
if cmd_args[0] == 'parse_test':

View file

@ -55,7 +55,7 @@ class TestSuiteCfg(TestSuiteBase):
'shared_data': '{}/data_dir/{}'.format(self.tmpdir,CfgFileSampleSys.test_fn_subdir),
'usr': '{}/data_dir/mmgen.cfg'.format(self.tmpdir),
'sys': '{}/data_dir/{}/mmgen.cfg'.format(self.tmpdir,CfgFileSampleSys.test_fn_subdir),
'sample': '{}/data_dir/mmgen.cfg.sample'.format(self.tmpdir),
'sample': '{}/data_dir/mmgen.cfg.sample'.format(os.path.abspath(self.tmpdir)),
}[id_str]
def copy_sys_sample(self):

View file

@ -210,7 +210,6 @@ class TestSuiteRegtest(TestSuiteBase,TestSuiteShared):
('bob_bal5', "Bob's balance"),
('bob_send_non_mmgen', 'sending funds to Alice (from non-MMGen addrs)'),
('generate', 'mining a block'),
('alice_bal_rpcfail', 'RPC failure code'),
('alice_send_estimatefee', 'tx creation with no fee on command line'),
('generate', 'mining a block'),
('bob_bal6', "Bob's balance"),
@ -919,16 +918,6 @@ class TestSuiteRegtest(TestSuiteBase,TestSuiteShared):
addr = self.proto.pubhash2addr('00'*20,False) # regtest (testnet) zero address
return self.alice_add_label_badaddr( addr, f'Address {addr!r} not found in tracking wallet' )
def alice_bal_rpcfail(self):
addr = self._user_sid('alice') + ':C:2'
os.environ['MMGEN_RPC_FAIL_ON_COMMAND'] = 'listunspent'
t = self.spawn('mmgen-tool',['--alice','getbalance'])
os.environ['MMGEN_RPC_FAIL_ON_COMMAND'] = ''
t.expect('Method not found')
t.read()
t.req_exit_val = 3
return t
def alice_remove_label1(self):
sid = self._user_sid('alice')
mmid = sid + (':S:3',':L:3')[self.proto.coin=='BCH']