[Distutils] The 'test' command

Andrew Kuchling akuchlin@mems-exchange.org
Mon Mar 26 16:37:02 2001


On Sat, Mar 24, 2001 at 01:14:46AM -0700, Sean Reifschneider wrote:
>Along with the name, I think that it'll have to have a default stub which
>does an "exit(0)" (the default test succeeds) so that the lack of a test
>doesn't show up the same as a test failure.

An open question: what should the 'test' command do?  We could adopt
some convention to automatically locate test scripts automatically
(all files matching test/*.py, for example), with a
tests=['dir/test1.py', dir/test2.py'] override to explicitly list test
scripts and ignore the convention.

Next, what would it do with the test scripts?  In 2.1b2,
test.test_support.run_unittest() raises TestFailed when a test suite
fails.  Would it be sufficient to execfile() all the test scripts,
note which ones raise TestFailed, and print a list of failing tests
(which would come after the output of individual test scripts).

--amk