[New-bugs-announce] [issue9926] Wrapped TestSuite subclass does not get __call__ executed

Martin v. Löwis report at bugs.python.org
Thu Sep 23 16:32:48 CEST 2010

New submission from Martin v. Löwis <martin at v.loewis.de>:

In Python 3.2, when inheriting from TestSuite, it is no longer possible to override __call__ (e.g. to introduce a TestSuite setUp and tearDown).
The __call__ method will not be called anymore.

Instead, if the object has a _wrapped_run defined (which it will, since it inherits from TestSuite), then this is called instead. Overriding _wrapped_run is a work-around, however, this being a private method, overriding it is probably not a good idea.

assignee: michael.foord
messages: 117192
nosy: loewis, michael.foord
priority: normal
severity: normal
status: open
title: Wrapped TestSuite subclass does not get __call__ executed
versions: Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list