[Distutils] [py-dev] Re: setuptools presentation

Patrick K. O'Brien pobrien at orbtech.com
Fri Aug 12 22:06:27 CEST 2005


Ian Bicking wrote:
> 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
> command...?

+1 on the latter (make "python setup.py test ..." equivalent to "py.test
...") over the former.  I'd hate to see py.test have to conform to the
awkward conventions introduced by unittest.

Also, the MEMS folks have that Sancho thing, which I seem to recall is a
testing framework.  Might want to get their opinion on that matter, as
they use that testing convention for Durus, Quixote, and other packages.

-- 
Patrick K. O'Brien
Orbtech    http://www.orbtech.com
Schevo     http://www.schevo.org
Pypersyst  http://www.pypersyst.org



More information about the Distutils-SIG mailing list