[Distutils] tests_require and test_suite in egg-info

Jim Fulton jim at zope.com
Fri Jan 5 14:27:54 CET 2007

Phillip J. Eby wrote:
> At 05:10 PM 1/4/2007 -0500, Jim Fulton wrote:
>> 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.
> Ah.
>> 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.
> The setuptools test command has a broader mission than just that,

Can you summarize the mission of the test command?

AFAICT, it boils down to running tests.

> but 
> having entry points for tests to be run by tools like zc.buildout is 
> certainly a good idea;

Note that zc.buildout wouldn't run the test.  A buildout recipe
would create a test runner script that can run the tests.

 > I suggest you create and publicize a de facto
> standard for them.

OK.  I'll propose something in a separate note.

> The tricky part is that unless there is some way for setuptools to tell 
> that:
> 1. the test suite is included, and
> 2. it can be adequately described as an entry point or collection thereof
> then I don't see a way to automatically map from existing test 
> information to entry points.
> In particular, note that setuptools allows custom loaders to essentially 
> usurp the entire standard testing process.  Although testing is intended 
> to be automatable, and have a common access point ("setup.py test"), the 
> output of such test and the required environment (GUI, CLI, 
> interactivity?) for them is not defined.  So, trying to build a 
> higher-level harness on the basis of what setuptools allows for is 
> probably not a good idea here.

OK. I'm convinced.

> However, the reverse is possible: if you define a standard for these 
> things that the entry points must conform to, then I can make setuptools 
> support *that* standard, and even recommend it in the documentation as 
> the preferred way to specify a test target.
> Does that make sense?

Yup. Very much.


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