CmdTestBase: new is_helper attribute
This commit is contained in:
parent
e0d5463ea7
commit
26ff0081cc
5 changed files with 13 additions and 8 deletions
|
|
@ -39,6 +39,7 @@ class CmdTestBase:
|
|||
platform_skip = ()
|
||||
tmpdir_nums = []
|
||||
test_name = None
|
||||
is_helper = False
|
||||
|
||||
def __init__(self, cfg, trunner, cfgs, spawn):
|
||||
if hasattr(self, 'name'): # init will be called multiple times for classes with multiple inheritance
|
||||
|
|
|
|||
|
|
@ -436,6 +436,7 @@ class CmdTestEthBump(CmdTestEthBumpMethods, CmdTestEthSwapMethods, CmdTestSwapMe
|
|||
class CmdTestEthBumpLTC(CmdTestSwapMethods, CmdTestRegtest):
|
||||
network = ('ltc',)
|
||||
tmpdir_nums = [43]
|
||||
is_helper = True
|
||||
cmd_group_in = CmdTestRegtest.cmd_group_in + (
|
||||
('setup', 'LTC regtest setup'),
|
||||
('walletconv_bob', 'LTC wallet generation'),
|
||||
|
|
|
|||
|
|
@ -321,6 +321,7 @@ class CmdTestEthSwapEth(CmdTestEthSwapMethods, CmdTestSwapMethods, CmdTestEthdev
|
|||
tmpdir_nums = [48]
|
||||
fund_amt = '123.456'
|
||||
token_fund_amt = 1000
|
||||
is_helper = True
|
||||
|
||||
bals = lambda self, k: {
|
||||
'swap1': [('98831F3A:E:1', '123.456')],
|
||||
|
|
|
|||
|
|
@ -170,14 +170,15 @@ class CmdGroupMgr:
|
|||
yield green(f'{desc} COMMAND GROUPS AND SUBGROUPS:')
|
||||
yield ''
|
||||
for name, cls in ginfo:
|
||||
yield ' {} - {}'.format(
|
||||
yellow(name.ljust(13)),
|
||||
(cls.__doc__.strip() if cls.__doc__ else cls.__name__))
|
||||
if 'cmd_subgroups' in cls.__dict__:
|
||||
subgroups = {k:v for k, v in cls.cmd_subgroups.items() if not k.startswith('_')}
|
||||
max_w = max(len(k) for k in subgroups)
|
||||
for k, v in subgroups.items():
|
||||
yield ' + {} · {}'.format(cyan(k.ljust(max_w+1)), v[0])
|
||||
if not cls.is_helper:
|
||||
yield ' {} - {}'.format(
|
||||
yellow(name.ljust(13)),
|
||||
(cls.__doc__.strip() if cls.__doc__ else cls.__name__))
|
||||
if 'cmd_subgroups' in cls.__dict__:
|
||||
subgroups = {k:v for k, v in cls.cmd_subgroups.items() if not k.startswith('_')}
|
||||
max_w = max(len(k) for k in subgroups)
|
||||
for k, v in subgroups.items():
|
||||
yield ' + {} · {}'.format(cyan(k.ljust(max_w+1)), v[0])
|
||||
|
||||
from mmgen.ui import do_pager
|
||||
do_pager('\n'.join(gen_output()))
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ class CmdTestRuneSwapRune(CmdTestSwapMethods, CmdTestRune):
|
|||
networks = ('rune',)
|
||||
tmpdir_nums = [58]
|
||||
input_sels_prompt = 'to spend from: '
|
||||
is_helper = True
|
||||
|
||||
cmd_group_in = CmdTestRune.cmd_group_in + (
|
||||
# rune_swap:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue