Friday, May 30, 2008

Shameless copying in progress

I'm currently swiping the nose test setup from SciPy and wedging it into NumPy. So far I've copied over the nose-related modules from scipy/testing, tweaked them a little, renamed a lot of NumPy tests from "check_something" to "test_something" (nose is currently using test match regex "^test_*", which, coupled with the method renaming, seems to keep it from trying to run things it shouldn't), and test class fixtures inherit from unittest.TestCase instead of NumpyTestCase.

At the moment the nose-ified NumPy test suite picks up 1749 tests; 48 of these have errors and 12 fail. Some of those look like actual test failures, but most of them are clearly a result of the tests expecting special behavior that used to be provided by NumpyTestCase.

A full test run on a clean build of NumPy from the svn trunk finds 1275 tests with no errors and no failures, so I apparently have some cleanup/checking to do yet before numpy.test() should work correctly. I already stumbled across a few test modules that imported other test modules so that they got run correctly under the old framework, so there's probably some of that going on somewhere, giving a test count greater than the total number of unique tests.