[TIP] cleanUp for unittest

holger krekel holger at merlinux.eu
Fri Apr 3 12:50:38 PDT 2009

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.  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 :) 

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 :) 


Metaprogramming, Python, Testing: http://tetamap.wordpress.com
Python, PyPy, pytest contracting: http://merlinux.eu 

More information about the testing-in-python mailing list