Monday, June 23, 2008

Old test stuff restored

All the old (1.1) test classes are back in NumPy. I can run old-style tests without any troubles locally, and hopefully that will hold for all the user test suites out there.

The module .test() functions will now also take the old arguments (which fortunately were passed in as keyword arguments in all the cases I've seen so far), and warn that they should be updated before the next release. As before, test() returns a TextTestResult; this required a little bit of tweaking on nose, because the test result object is discarded by default. Apparently nobody ever needed it back before, and that's why it's not kept. This might be changed in nose at some point in the future.

Unfortunately there's no way to tell if the new test suite works on the various buildbot machines, since none of them apparently have nose installed. :(

I managed to inadvertently add coverage support when I made my first big checkin. Playing around with experimental stuff in your working directory at the last minute FTL. :/ Anyway, Robert Kern was nice enough to point out some points on which it was lacking, and those are fixed. Running numpy.test(coverage=True) will now report coverage limited to NumPy, and numpy.core.test will limit coverage reporting to numpy.core, etc.

A quick test shows that it's not hard to change SciPy to use numpy.testing, allowing the removal of the code in scipy/testing.