Message108275
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. |
|
Date |
User |
Action |
Args |
2010-06-21 15:28:03 | jcollado | set | recipients:
+ jcollado, bethard, eric.araujo, r.david.murray |
2010-06-21 15:28:02 | jcollado | set | messageid: <1277134082.88.0.838666539233.issue9026@psf.upfronthosting.co.za> |
2010-06-21 15:28:00 | jcollado | link | issue9026 messages |
2010-06-21 15:28:00 | jcollado | create | |
|