[TIP] Unittest Changes

C. Titus Brown ctb at msu.edu
Mon Jul 21 06:41:24 PDT 2008


On Mon, Jul 21, 2008 at 02:35:58PM +0100, Michael Foord wrote:
-> Jonathan Lange wrote:
-> 
-> Right - although virtually every project I've worked on with unittest 
-> had ended up with an ad-hoc test collection mechanism, so I think the 
-> 'discover_tests' features I've discussed are prima-facie needed.

How difficult (and controversial) do you think it would be to provide a
"test hook" that could reside in some top-level place (setup.py, or
module __init__, or something) that would let you override
discover_tests with your own evil algorithm?

For example, setuptools lets you specify

	    test_suite = 'nose.collector'

if you want to have

	python setup.py test

run nose.

It would be nice to have this a bit more programmatically available, so
that you don't have to run setup.py.  Or maybe it doesn't matter... what
do you think?

cheers,
--titus



More information about the testing-in-python mailing list