Javier Collado <javier.coll...@gmail.com> added the comment:

The hasattr expressions were added to TestHelpFormattingMetaclass because:
- A new attribute (subparsers_signature) was added in test classes that wasn't 
used in the past.
- The new test classes didn't make use of some of the already in place 
attributes (argument_signatures, argument_signatures)
- The old test classes didn't make use of the new attribute 
(subparsers_signature).
- TestHelpFormattingMetaclass assumed that those attributes were present in 
test classes (otherwise an exception was raised).

Hence, in order not to change/break a lot of test cases, I decided to add the 
hasattr expressions.

----------

_______________________________________
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

Reply via email to