[SciPy-dev] Making numpy test work in scikits

David Cournapeau david@ar.media.kyoto-u.ac...
Fri Jul 20 07:23:11 CDT 2007

David Cournapeau wrote:
> Stefan van der Walt wrote:
>> On Fri, Jul 20, 2007 at 07:54:19PM +0900, David Cournapeau wrote:
>>> to return a testsuite (that's the core problem: NumpyTest sometimes run 
>>> tests, sometimes returns the testsuite).
>> When level < 0, NumpyTest.test always returns a testsuite, i.e.
>> In [9]: print NumpyTest(numpy.linalg).test(level=-1)
>>   Found 32 tests for numpy.linalg
>>   Found 0 tests for __main__
>> <unittest.TestSuite tests=[<numpy.tests.test_linalg.test_det
>>   testMethod=check_cdouble>,  ... , <numpy.tests.test_linalg.test_svd testMethod=check_single>]>
> Can you do the same but without executing the testsuite ? I don't want 
> to run anything, just get the testsuite, which will be run by setuptools.
Well, I asked my question too quickly. The problem is that I want to 
define a function test_suite which returns the test suite of the 
package. If I do:

def test_suite(*args):
    return NumpyTest().test(level = -1)

Then while executing the tests with setuptools, I have some infinite 
recursion (which is due to the fact that NumpyTest is importing the 
current package I guess ?). I am kind of stuck, and I feel like I 
already wasted way too much time on this.



More information about the Scipy-dev mailing list