Javier Collado <javier.coll...@gmail.com> added the comment: Finally I had to use an OrderedDict as suggested by R. David Murray because it wasn't safe to rely on _choices_actions in HelpFormatter class (i.e. previous patch wasn't valid): - _choices_actions attribute is only present in _SubParsersAction class - Even if action object is an instance of _SubParsersAction, _choices_actions only contains data for for subparsers that contain a help description.
Regarding the test cases: - TestHelpSubparsersOrdering and TestHelpSubparsersWithHelpOrdering have been added - TestHelpFormattingMetaClass has been modified: - New subparsers_signatures tester attribute added to test subparsers help. - If a 'signatures attribute' isn't present in tester object, then isn't consumed - assertMultilineEqual used instead of assertEqual to make it easier to debug test case failures. ---------- Added file: http://bugs.python.org/file17730/trunk.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9026> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com