[SciPy-dev] Making numpy test work in scikits

Stefan van der Walt stefan@sun.ac...
Fri Jul 20 06:49:22 CDT 2007


On Fri, Jul 20, 2007 at 07:54:19PM +0900, David Cournapeau wrote:
> Matthieu Brucher wrote:
> I don't understand what you mean by tests which are not part of the 
> numpy test suite, though. For me, the problem is that there is no way 
> (or more precisely, I didn't a find a way) to always get a testsuite 
> from NumpyTest. Typically, my method works if you test everything, but 
> does not work if you want to test some part of it.

The following should work to test, for example, only numpy.linalg:

from numpy.testing import NumpyTest
import numpy

suite = NumpyTest(numpy.linalg)
suite.test()

The test_*.py pattern is specified as

NumpyTest.testfile_patterns

(default is ['test_%(modulename)s.py']), but because of the way
NumpyTest is written, there is a one-to-one correspondence between
module names and test files.  Maybe that should change.

Regards
Stéfan




More information about the Scipy-dev mailing list