[Distutils] buildout, zc.recipe.testrunner and tests_require

Jim Fulton jim at zope.com
Mon Mar 12 14:47:27 CET 2007

On Mar 11, 2007, at 11:08 AM, Nathan R. Yergler wrote:
> I tried using zc.recipe.testbrowser, thinking that maybe it'd look at
> the tests_require for the target eggs, but no such luck.

The tests_require option is only visible to the setup script.  It  
doesn't cause any data to be included in egg info.  It is an  
attractive nuisance IMO.

See: http://mail.python.org/pipermail/distutils-sig/2007-January/ 

In situations like this, I use a test extra and extra_requires to  
specify testing dependencies.  Then, when using the testrunner  
recipe, I use something like:

eggs = foo [test]

to indicate that the test runner should load and test the foo egg  
with its test dependencies.

> The
> testrunner also seems pretty promiscuous in looking for things to test
> (it tries to import my eggs directory and test them which predictably
> doesn't work), but that's another story.

That's odd. I haven't seen this problem.  What settings were you  

The testrunner recipe uses the Zope test runner, http:// 
www.python.org/pypi/zope.testing, which I think has a lot of nice  
features to support development, but It doesn't yet support running  
tests from zipped eggs.


Jim Fulton			mailto:jim at zope.com		Python Powered!
CTO 				(540) 361-1714			http://www.python.org
Zope Corporation	http://www.zope.com		http://www.zope.org

More information about the Distutils-SIG mailing list