[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())
Robert Collins
report at bugs.python.org
Mon Sep 12 23:47:38 EDT 2016
Robert Collins added the comment:
@Chris - I don't like the idea of making new classes on the fly like that, it seems more likely to provoke bugs (as type(case) != SomeSpecificClass) anymore after that, vs just not relying on __str__ directly.
Going back to Michael's proposal of short description, long description and repr (with str == repr) for debugging. - that is missing id(), and id() is IMO definitely still needed.
I was proposing id(), friendlyId(), shortDescription(), and __str__ calls friendlyId(), and __repr__ is a regular <...> repr.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16288>
_______________________________________
More information about the Python-bugs-list
mailing list