[TIP] unittest & TDD

Grig Gheorghiu grig at gheorghiu.net
Sun Mar 11 20:13:12 PDT 2007


--- Collin Winter <collinw at gmail.com> wrote:

> I'm not so much looking for code as I am for ideas. The more ideas
> about test discovery/running/reporting/etc I have in hand, the more
> data points I have to work from when figuring out how this thing
> should operate.

Collin -- one thing I'd like very much to see is a standardized way to
run test suites for any package -- at least for any package that is
setuptools-enabled.

See this thread in the distutils mailing list:

http://mail.python.org/pipermail/distutils-sig/2007-January/007092.html

I would like to be able to run:

python setup.py test

for any package that supports setuptools, and have that command invoke
the automated test suite for that package.

Nose currently supports this via its test collector. It would be nice
if this could be included in the new unittest.

That's one thing that the Perl guys have going for them. If you
download a Perl module from CPAN, you can say:

perl Makefile.PL
make
make test
make install

....and the 'make test' step just works. 

Wouldn't it be nice to be able to do 'python setup.py test' for any
package you download from PyPI?

Grig



More information about the testing-in-python mailing list