Issue 7893: unittest: have to subclass TextTestRunner to use alternative TestResult (original) (raw)
A common way to extend unittest is to implement a custom TestResult. Currently you have to subclass TextTestRunner, overriding _makeResult, to get it to use an alternative result class.
I suggest adding an additional, optional, argument to TextTestRunner to specify an alternative result class (or callable) that will be used by _makeResult. This will permit the use of custom test result objects without having to subclass.