[issue12600] Support parameterized TestCases in unittest

R. David Murray report at bugs.python.org
Mon Jan 16 14:10:28 CET 2012


R. David Murray <rdmurray at bitdance.com> added the comment:

Meaning you want to run the same test suite with a variety of different DB connections?  That seems like a reasonable use case.

Personally I find that while I sometimes create subclasses to adjust certain class parameters (thus creating a parameterized test case), more often I also have test support methods that are different between the subclasses, which would be more clumsy to do via non-subclass parameterization.

Also, I do have to admit that for the case of just adjusting class constants, it would probably be a fair bit more readable to use a class parameterization scheme to express the testing variations, if only because it would pull the variations into a single cohesive block of code.

So I guess I'm a +0 on this given a concrete use case.

----------

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


More information about the Python-bugs-list mailing list