[TIP] parametrized testing and unittest2.TestCase

Hans Sebastian hnsbstn at gmail.com
Fri Dec 16 13:00:14 PST 2011


Hi,

I need help and some suggestions. I run tests using py.test (latest from
pip) and use unittest2.TestCase as the base class for the tests. Today, I
am trying to parametrized multiple calls to a test function by following
the example in the online doc. I found that it only works with test class
that extends from *object* but not with the one that extends from *
unittest2.TestCase*. First of all, is this a bug or just not supported by
py.test? If not possible, what are alternative ways of parametrizing
testing but still want to reuse unittest2.TestCase's assert methods?

Thanks
-hans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20111216/c782b2f1/attachment.html>


More information about the testing-in-python mailing list