[Distutils] setuptools presentation

Ian Bicking ianb at colorstudy.com
Fri Aug 12 21:35:10 CEST 2005

CC'ing to bring together opposing viewpoints... (this is referring to 
setuptools' "setup.py test" command, which expects to have a TestSuite 
to run)

Phillip J. Eby wrote:
> Also, the 'test' command isn't "limited" to unittest, it 
> just expects a unittest-compatible wrapper.  For example, doctest has 
> functions that wrap doctests as unittest suites, so it's quite possible 
> to use that.  As far as I'm concerned, unittest suites are the WSGI of 
> testing; if somebody creates a fancy new test framework, they should 
> darn well make it possible to put a unittest suite wrapper around it, so 
> that people can integrate their existing tests.  :)

Well, I don't know what exactly my opinion is.  At a py.test user I 
don't have TestSuites for my tests.  I've argued py.test should load 
TestCase-based tests by default, but this is kind of the opposite.  I 
don't think it would be that hard to produce such suites; the test items 
that py.test collects could just be stuffed into a TestCase.

The result would be acceptable as a sort of "this package thinks it runs 
okay" test.  It's not the frontend I'd like to give to users.

That said, if "python setup.py test ..." was completely equivalent to 
"py.test ..." then that would be great, because though the interface 
would be different from projects that use unittest, the entry point 
would be the same (assuming py.test is installed).  I suppose a package 
could add an entry point that overrides the normal setuptools test 

Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org

More information about the Distutils-SIG mailing list