[issue9926] Wrapped TestSuite subclass does not get __call__ executed

Martin v. Löwis report at bugs.python.org
Fri Sep 24 20:23:31 CEST 2010


Martin v. Löwis <martin at v.loewis.de> added the comment:

> Perhaps slightly ironically (for this particular bug report) is that
> the change was introduced to support class and module level setUp and
> tearDown (similar to the use-case it now blocks).

FWIW, this issue arrived from pygresql, see TestSuite2 in
http://tinyurl.com/2ap9t6d

Here, the objective is to wrap a number of test suite classes
with a single setup/teardown, covering all test cases that occur
in either test suite, so that the expensive database creation
happens only once. I can't see how either class or module level
setup could easily replace this.

> A backwards compatible change would be to rename BaseTestSuite *back*
> to TestSuite and give the current TestSuite a new name.

That sounds good to me.

> The disadvantage of this approach is that it is not uncommon for test
> frameworks to create suites themselves - and doing this could 'break'
> tests using class / module fixtures.

You mean, for test suites that have been modified to explicitly
support Python 2.7?

> Any other suggestions or ideas?

I think this would then be for python-dev to discuss.

----------

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


More information about the Python-bugs-list mailing list