Browse Source

test.py: minor fixes

The MMGen Project 3 years ago
parent
commit
53145cbc9f
3 changed files with 4 additions and 15 deletions
  1. 3 3
      test/misc/cfg.py
  2. 1 1
      test/test_py_d/ts_cfg.py
  3. 0 11
      test/test_py_d/ts_regtest.py

+ 3 - 3
test/misc/cfg.py

@@ -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':

+ 1 - 1
test/test_py_d/ts_cfg.py

@@ -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):

+ 0 - 11
test/test_py_d/ts_regtest.py

@@ -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']