[Distutils] tests_require and test_suite in egg-info

Jim Fulton jim at zope.com
Thu Jan 4 23:10:55 CET 2007

On Jan 4, 2007, at 4:37 PM, Phillip J. Eby wrote:

> At 04:14 PM 1/4/2007 -0500, Jim Fulton wrote:
>> It appears that the values of the tests_require and test_suite
>> keyword arguments isn't captured in egg-info.  Am I missing
>> something?  Why would this information be omitted?
> Because the only existing tool that uses that information (the test  
> command) can't be run without the setup.py, which isn't installed  
> with the egg.

uh huh.

> In any case, many projects treat tests as development tools only,  
> rather than installing them with the project's main code.

Many projects like to run tests even of packages they use, especially
if there is a problem.

>>   I would like to
>> use it when generating test runners in zc.buildout.
> Well, you could add an egg_info plugin writer to do it, or you  
> could add a custom setuptools command like "create_test_runners"  
> and run setup.py on it.  There are probably also other ways I  
> haven't thought of.  :)

I can't do any of this if all I have is an egg.  I want to be able to  
be able to run the
tests that come with eggs.

I suggest that it would be better for setuptools to record this  
information by default.

Then again, I think that these are duplicative of other features.   
For example,
tests_require could just be handled by an entry in extras_require for  
a "tests"
extra and test suites could be handled as entry points.


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