[TIP] Test discovery for unittest

holger krekel holger at merlinux.eu
Sat Apr 4 00:18:36 PDT 2009

On Fri, Apr 03, 2009 at 19:27 -0700, C. Titus Brown wrote:
> -> Michael Foord wrote:
> -> > For those who might be interested I've been playing with test discovery 
> -> > for unittest. I have a simple working prototype in about 80'ish lines of 
> -> > code.
> -> >
> -> > http://code.google.com/p/unittest-ext/source/browse/trunk/discovery.py
> -> >
> -> > I'll be using  this sandbox to turn unittest into a package as well.
> Then Ned Batchelder wrote:
> -> This sounds like what nose does.  Are you taking a different approach?
> I hope he is; now that nose and py.test have converged on both test
> discovery and plugin running, there's room for another unit test
> discovery framework.  I'd prefer something as different as possible, in
> fact; while I'm a huge fan of the simplicity and readability of nose
> test files, I know that some people really like e.g. deep inheritance
> hierarchies of test code.  A test discovery framework that supported a
> much more complicated test layout would really fill an unoccupied niche,
> I feel.

Huh?  There is nothing in nose or py.test that prevents your from 
doing all the compilcated inheritance trees you'd like to do. 
Both can also run unittest.py style files.  

> One can only hope it will get added to the Python core quickly.

Honestly, I don't get why people are eager to add code to
python standard lib.  It will take years before one can
actually recommend using it and it will not be usable for
testing for multiple python versions.  All the large test
suites and custom or general test runner out there already 
have or can easily provide their own support code.  

But i understand that people like the "addCleanup" idea and have
used it in their test runner.  Maybe the idea is dead enough to 
enter the standard lib. 


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

More information about the testing-in-python mailing list