[TIP] testing __init__

Alfredo Deza alfredodeza at gmail.com
Fri Apr 9 17:54:23 PDT 2010


Hi

I am having issues testing the constructor of a class that has a try/except
block.

Should __init__ raise an exception so I can catch via self.assertRaises to
make it easier to test? Or are there other ways
to make __init__ "testable"?

What is the way you guys use the most (or like the best) for testing
__init__?



Thanks!



-- 
Alfredo Deza
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20100409/accfa169/attachment.htm>


More information about the testing-in-python mailing list