[Numpy-discussion] nose test return values
Wed Jun 18 11:21:08 CDT 2008
I have received the following message from our system guru here at STScI
regarding the recent changes to the way testing is done with nose. The
automated scripts he was using to monitor the success or failure of
numpy builds is now broken. Below is his message:
The new numpy test interface returns None instead of
Even if you don't want to return unittest objects, the test should
return some indication of which tests failed, which could not be run due
to errors (a test that failed is different from a test that couldn't
even run), and whether the test suite as a whole can be considered passing.
For my purposes, the wasSuccessful() method of the returned object is
absolutely essential. If wasSuccessful() returns true, I am not going
to look at the numpy tests; if it returns false, somebody has to find
which tests failed and decide whether that is going to affect the other
...lots out output...
<unittest._TextTestResult run=693 errors=0 failures=0>
>>> n = numpy.test(label="full", verbose=0)
>>> print n
n = numpy.test(level=10)
print "errors: "
for x in n.errors:
print " ",x
print "failures: "
for x in n.failures:
print " ",x
if n.wasSuccessful() :
Of course, these same comments will apply to scipy when I next install it.
I believe that he makes a very good point. Is there any way that some
form of test report object can be returned?
Systems Software Engineer
Space Telescope Science Institute
3700 San Martin Drive
Baltimore MD, 21218
More information about the Numpy-discussion