[TIP] cleanUp for unittest

Doug Philips dgou at mac.com
Fri Apr 3 14:36:40 PDT 2009

On or about Friday, April 03, 2009, at 05:13PM, Victoria G. Laidler indited:
>I could get started with unitTest quickly because I didn't have to 
>understand anything about how it worked behind the scenes: all I had to 
>do was subclass from TestCase and write a setUp(), tearDown(), and 
>test1(), test2(), etc, methods. I can explain *that* to my scientist 
>colleagues! ;)
>I think it's worth making the cleanup functionality available to people 
>who would not really know how to overload the .runTest() method, or be 
>unwilling to go that route for fear of breaking something because 
>they're messing with stuff they don't really understand.

If all the cleanup is done with the new facility, would you advise your scientist colleagues to avoid tearDown?
If not, how would you tell them what to use which facility for?
Is there anything even left for tearDown to do once you have cleanup?


More information about the testing-in-python mailing list