[New-bugs-announce] [issue12376] unittest.TextTestResult.__init__ breaks under complex __mro__

Ben Ranker report at bugs.python.org
Mon Jun 20 19:39:14 CEST 2011

New submission from Ben Ranker <branker at emory.edu>:

TextTestResult.__init__(...) calls super(TextTestResult, self).__init__() with no args. If a custom TextTestResult descendant has a complex inheritance hierarchy that puts another class between TextTestResult and TestResult in the __mro__, then that class doesn't receive the common stream, descriptions, and verbosity args. If it needs them to function then the __init__ chain explodes.

See attached breakunit.py for an example of this.

components: Library (Lib)
files: breakunit.py
messages: 138744
nosy: branker
priority: normal
severity: normal
status: open
title: unittest.TextTestResult.__init__ breaks under complex __mro__
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file22418/breakunit.py

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list