[Distutils] tests_require and test_suite in egg-info

Phillip J. Eby pje at telecommunity.com
Fri Jan 5 00:44:36 CET 2007

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.


>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, but 
having entry points for tests to be run by tools like zc.buildout is 
certainly a good idea; I suggest you create and publicize a de facto 
standard for them.

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.

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?

More information about the Distutils-SIG mailing list