[Numpy-discussion] unit tests / developing numpy

Nathaniel Smith njs at pobox.com
Thu Jul 25 06:02:10 EDT 2013


A cleaner option is to use virtualenv:

virtualenv --python=/usr/bin/python2.7 my-test-env
cd my-test-env
bin/pip install $NUMPY_SRCDIR
bin/python $NUMPY_SRCDIR/tools/test-installed-numpy.py --mode=full

Or you can install 'tox', and then running 'tox -e py27' will do the
above, 'tox -e py27,py33' will check both 2.7 and 3.3, plain 'tox'
will test all supported configurations (this requires you have lots of
python interpreter versions installed), etc.

Those docs are in doc/source/dev/gitwash in the numpy source tree --
if you have any thoughts on how to make them clearer than pull
requests are appreciated :-). You probably have a better idea than us
how to put things clearly to someone who's just starting...

-n

On Thu, Jul 25, 2013 at 10:17 AM, Graeme B. Bell <grb at skogoglandskap.no> wrote:
>
> To run unit tests on a dev version of numpy:
> It won't run if you start in the source directory, so a cd is also needed:
>
>
>
> python setup.py build
> python setup.py install --prefix=/tmp/numpy
> export PYTHONPATH="/tmp/numpy/lib64/python2.7/site-packages/"
> cd ..
> python
>
>>>> import numpy
>>>> print numpy.version.version
>>>> numpy.test()
>
>
> Adjust according to your version of python.
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list