[TIP] cleanUp for unittest

Michael Foord fuzzyman at voidspace.org.uk
Fri Apr 3 13:07:20 PDT 2009

holger krekel wrote:
> Hi Michael, 
> On Fri, Apr 03, 2009 at 19:58 +0100, Michael Foord wrote:
>> I have no idea whether this particular feature is in other xUnit 
>> inspired frameworks. Irregardless, unittest is a Python testing 
>> framework and development should be driven by patterns useful to testing 
>> Python - and whether or not similar patterns are used elsewhere is 
>> more-or-less irrelevant. For example, you would never implement this 
>> feature in this way in Junit because Java has no first class functions.
> When targetting "testing" in general i'd rather not aim too much for 
> changing unittest.py.  

Sure, you don't use it. :-)

> As guido says the standard library is for 
> dead code and at least i don't consider supporting better ways for
> functional and integration testing with Python to be a
> dead-code project :) 

His word was stable, not dead.

We should be conservative, and with a new release every 18 months 
standard library modules *can't* grow rapidly, but we will continue to 
see unittest grow and adapt to testing needs and useful patterns.


> but your mileage may vary and for me it's fine if you want to care
> for adding some more refined cleanUp semantics to unittest.py. 
> Maybe the suggestion in my other post about getresources() is
> applicable in this case.  
>> Looking for examples in the standard library would be a good idea. To be 
>> honest it seems such a clean and simple idea I'm surprised at the 
>> pushback so may not pursue it. But still, plenty of other fish to fry.
> tons of fish everywhere, indeed :) 
> cheers,
> holger


More information about the testing-in-python mailing list