[openstack-dev] [quantum] unittest updates

Monty Taylor mordred at inaugust.com
Thu Feb 21 05:33:16 UTC 2013



On 02/21/2013 05:22 AM, Robert Collins wrote:
> On 21 February 2013 18:16, Monty Taylor <mordred at inaugust.com> wrote:
>> Hey all!
> 
>> - If you add new tests and as part of doing that you add a setUp or a
>> tearDown method - PLEASE add an upcall. This is going to be enforced by
>> testtools soon anyway, so it's good to get in the habit
> 
> Also, don't write tearDown's at all. I believe the current code uses
> unittest[2] as base classes, and that supports addCleanup, which is
> better that tearDown :)

Great point.

Yes. Please please please don't write tearDowns. I'd forgotten that
unittest2 has addCleanup already.

Monty



More information about the OpenStack-dev mailing list