Browse Source

test/test.py: support ‘invisible’ subgroups starting with ‘_’

The MMGen Project 2 years ago
parent
commit
5579f41e19
1 changed files with 3 additions and 2 deletions
  1. 3 2
      test/test.py

+ 3 - 2
test/test.py

@@ -489,8 +489,9 @@ class CmdGroupMgr(object):
 					yellow(name.ljust(13)),
 					(cls.__doc__.strip() if cls.__doc__ else cls.__name__) )
 				if hasattr(cls,'cmd_subgroups'):
-					max_w = max(len(k) for k in cls.cmd_subgroups)
-					for k,v in cls.cmd_subgroups.items():
+					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