[Python-Dev] [Python-checkins] buildbot warnings in hppa Ubuntu dapper trunk
tim.peters at gmail.com
Fri Jun 9 06:21:45 CEST 2006
>> Well, this sure sucks. This is the earliest revision at which the
>> r46752 | georg.brandl | 2006-06-08 10:50:53 -0400 (Thu, 08 Jun
2006) | 3 lines
>> Changed paths:
>> M /python/trunk/Lib/test/test_file.py
>> Convert test_file to unittest.
>> If _that's_ not a reason for using doctest, I don't know what is ;-)
> That's hilarious! OK, that's it. I am definitely focusing my efforts for
> 2.6 in improving testing.
LOL. Believe it or not, we wouldn't have had a problem here if
doctest had been used instead -- but the reason isn't particularly
Before the conversion, test_file.py ended with:
so that TESTFN got removed _no matter what_. Some of the individual
tests here are careless about cleaning up after themselves, and that
last clause used to hide a multitude of lazy sins. A doctest would
naturally also have ended with a "clean up the mess" block.
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.
What that has to do with test_optparse is left as an exercise for the reader ;-)
More information about the Python-Dev