[Numpy-discussion] Switching to nose test framework (was: NumpyTest problem)

Robert Kern robert.kern at gmail.com
Mon Jun 9 19:15:53 EDT 2008


On Mon, Jun 9, 2008 at 18:07, Anne Archibald <peridot.faceted at gmail.com> wrote:

> Then again, it doesn't usually work for me to use the boilerplate to
> run a single test without installing, since the non-installed test
> doesn't necessarily find all the non-installed code, sometimes falling
> back on the installed code and giving false passes or mysterious
> failures. Usually I give up and just reinstall the whole beast and
> rerun all tests every time I make a change. How does nose behave in
> this situation?

nose doesn't affect importing; the test file imports work as normal.
If you want to test code in-place, you will need to do a build_ext
--inplace and set your sys.path accordingly (via PYTHONPATH, .pth
files, whatever). If you use setuptools/easy_install, this is all
combined: "python setupegg.py develop". In order to use an in-place
numpy to build packages like scipy, you will also need to symlink or
copy the generated header files into the appropriate places:

  python setup.py build_ext --inplace
  cd numpy/core/include/numpy
  ln -s ../../*.h .

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco



More information about the NumPy-Discussion mailing list