[issue7897] Support parametrized tests in unittest

R. David Murray report at bugs.python.org
Thu May 31 03:57:41 CEST 2012


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

People interested in this issue might be interested in changeset e6a33938b03f.  I use parameterized unit tests in email a lot, and was annoyed by the fact that I couldn't run the tests individually using the unittest CLI.  The fix for that turned out to be trivial, but by the time I figured it out, I'd already written most of the metaclass.  So since the metaclass reduces the boilerplate (albeit at the cost of looking like black magic), I decided to go with it.  And the metaclass at least avoids the rather questionable use of the "modify locals()" hack I was using before.

----------

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


More information about the Python-bugs-list mailing list