From 53145cbc9f2b26e5694c99f005e3b456a362aa6d Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sun, 10 Oct 2021 20:18:16 +0000 Subject: [PATCH] test.py: minor fixes --- test/misc/cfg.py | 6 +++--- test/test_py_d/ts_cfg.py | 2 +- test/test_py_d/ts_regtest.py | 11 ----------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/test/misc/cfg.py b/test/misc/cfg.py index d6c12f00..806e07ca 100755 --- a/test/misc/cfg.py +++ b/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': diff --git a/test/test_py_d/ts_cfg.py b/test/test_py_d/ts_cfg.py index f86b890e..53899f52 100755 --- a/test/test_py_d/ts_cfg.py +++ b/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): diff --git a/test/test_py_d/ts_regtest.py b/test/test_py_d/ts_regtest.py index 871610ef..ffb6b46f 100755 --- a/test/test_py_d/ts_regtest.py +++ b/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']