From 60003eac25e2a605a0ad20f8c71c2652d3fdfb2b Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sun, 31 Mar 2024 13:10:16 +0000 Subject: [PATCH] minor fixes --- mmgen/main_tool.py | 2 +- test/cmdtest_py_d/ct_automount.py | 1 + test/cmdtest_py_d/ct_automount_eth.py | 1 + test/cmdtest_py_d/ct_ethdev.py | 8 +++++--- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mmgen/main_tool.py b/mmgen/main_tool.py index d354acb8..646a734f 100755 --- a/mmgen/main_tool.py +++ b/mmgen/main_tool.py @@ -341,7 +341,7 @@ def get_cmd_cls(cmd): def get_mod_cls(modname): return getattr(importlib.import_module(f'mmgen.tool.{modname}'),'tool_cmd') -if gc.prog_name == 'mmgen-tool': +if gc.prog_name.endswith('-tool'): cfg = Config( opts_data=opts_data, parse_only=True ) po = cfg._parsed_opts diff --git a/test/cmdtest_py_d/ct_automount.py b/test/cmdtest_py_d/ct_automount.py index 1dcb4c58..1d2d3db0 100755 --- a/test/cmdtest_py_d/ct_automount.py +++ b/test/cmdtest_py_d/ct_automount.py @@ -92,6 +92,7 @@ class CmdTestAutosignAutomount(CmdTestAutosignThreaded, CmdTestRegtestBDBWallet) + [f'{self.burn_addr},1.23456', f'{sid}:{chg_addr}'], exit_val = exit_val or None) if exit_val: + t.expect(expect) t.read() self.remove_device_online() return t diff --git a/test/cmdtest_py_d/ct_automount_eth.py b/test/cmdtest_py_d/ct_automount_eth.py index 1d69e28d..55e67b83 100755 --- a/test/cmdtest_py_d/ct_automount_eth.py +++ b/test/cmdtest_py_d/ct_automount_eth.py @@ -83,6 +83,7 @@ class CmdTestAutosignETH(CmdTestAutosignThreaded, CmdTestEthdev): t = self.txcreate( args = ['--autosign', '98831F3A:E:11,54.321'], menu = [], + print_listing = False, acct = '1') t.read() self.remove_device_online() diff --git a/test/cmdtest_py_d/ct_ethdev.py b/test/cmdtest_py_d/ct_ethdev.py index 4a08c8e1..ec8f90ad 100755 --- a/test/cmdtest_py_d/ct_ethdev.py +++ b/test/cmdtest_py_d/ct_ethdev.py @@ -637,11 +637,13 @@ class CmdTestEthdev(CmdTestBase,CmdTestShared): interactive_fee = '50G', fee_info_data = ('0.00105','50'), no_read = False, + print_listing = True, tweaks = []): fee_info_pat = r'\D{}\D.*{c} .*\D{}\D.*gas price in Gwei'.format( *fee_info_data, c=self.proto.coin ) t = self.spawn('mmgen-'+caller, self.txcreate_args + ['-B'] + args) - t.expect(r'add \[l\]abel, .*?:.','p', regex=True) - t.written_to_file('Account balances listing') + if print_listing: + t.expect(r'add \[l\]abel, .*?:.','p', regex=True) + t.written_to_file('Account balances listing') t = self.txcreate_ui_common( t, menu = menu, @@ -698,7 +700,7 @@ class CmdTestEthdev(CmdTestBase,CmdTestShared): dt = namedtuple('data',['devkey_fn','dest','amt']) d = dt( parity_devkey_fn, burn_addr2, '1' ) t = self.txcreate( - args = [ + args = self.eth_args_noquiet + [ f'--keys-from-file={joinpath(self.tmpdir,d.devkey_fn)}', f'{d.dest},{d.amt}', ],