[Numpy-discussion] "import numpy" is slow

Andrew Dalke dalke@dalkescientific....
Thu Jul 31 01:12:05 CDT 2008

On Jul 31, 2008, at 3:53 AM, David Cournapeau wrote:
> You are supposed to run the tests on an installed numpy, not in the
> sources:
> import numpy
> numpy.test(verbose = 10)

Doesn't that make things more cumbersome to test?  That is, if I were  
to make a change I would need to:
   - python setup.py build  (to put the code into the build/*  
   - cd the build directory, or switch to a terminal which was  
already there
   - manually do the import/test code you wrote, or a write two-line  
program for it

I would rather do 'nosetests' in the source tree, if at all feasible,  
although that might only be possible for the Python source.

Hmm. And it looks like testing/nosetester.py (which implements the  
'test' function above) is meant to make it easier to run nose, except  
my feeling is the extra level of wrapping makes things more  
complicated.  The nosetest command-line appears to be more flexible,  
with support for, for examples, dropping into the debugger on errors,  
and reseting the coverage test files.

I'm speaking out of ignorance, btw.



More information about the Numpy-discussion mailing list