[Python-checkins] buildbot warnings in hppa Ubuntu dapper trunk

Fredrik Lundh fredrik at pythonware.com
Fri Jun 9 10:17:35 CEST 2006


Tim Peters wrote:

> After the conversion to unittest, there was no final cleanup block,
> and it just so happened that "testUnicodeOpen" has the alphabetically
> largest test name, so unittest runs it last, and testUnicodeOpen() was
> one of the lazy tests that didn't clean up after itself.

shouldn't tests be designed so that they can be run even if a previous 
run failed to clean up after itself ?

I generally design tests using this structure:

     cleanup() # establish preconditions

     test()

     if test successful:
         cleanup() # don't litter

</F>



More information about the Python-checkins mailing list