[New-bugs-announce] [issue7893] unittest: have to subclass TextTestRunner to use alternative TestResult

Michael Foord report at bugs.python.org
Tue Feb 9 18:11:44 CET 2010


New submission from Michael Foord <michael at voidspace.org.uk>:

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.

----------
assignee: michael.foord
components: Extension Modules
keywords: easy
messages: 99129
nosy: michael.foord
severity: normal
stage: needs patch
status: open
title: unittest: have to subclass TextTestRunner to use alternative TestResult
versions: Python 2.7, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7893>
_______________________________________


More information about the New-bugs-announce mailing list