unit tests / developing numpy
Does anyone know how to get the unit tests to run on a local fork, without doing a complete install of numpy? If so, please can you describe it, or better still, update: http://docs.scipy.org/doc/numpy/dev/gitwash/development_workflow.html It seems strange that the development workflow doesn't mention running any tests before committing/pushing/pulling. Graeme.
On Thu, 25 Jul 2013 08:47:03 +0000, Graeme B. Bell wrote:
Does anyone know how to get the unit tests to run on a local fork, without doing a complete install of numpy?
I usually do an in-place build with either bentomaker build -i -j or python setup.py build_ext -i Then export PYTHONPATH=$PYTHONPATH:/path/to/numpy and nosetests numpy Stéfan
To answer my own question in a clumsy way: To run unit tests on a dev version of numpy: python setup.py build python setup.py install --prefix=/tmp/numpy export PYTHONPATH="/tmp/numpy/lib64/python2.7/site-packages/" python
import numpy print numpy.version.version numpy.test()
Adjust according to your version of python. On Jul 25, 2013, at 10:47 AM, Graeme Bell <grb@skogoglandskap.no> wrote:
Does anyone know how to get the unit tests to run on a local fork, without doing a complete install of numpy?
If so, please can you describe it, or better still, update: http://docs.scipy.org/doc/numpy/dev/gitwash/development_workflow.html
It seems strange that the development workflow doesn't mention running any tests before committing/pushing/pulling.
Graeme.
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.
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@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@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
25.07.2013 13:02, Nathaniel Smith kirjoitti: [clip]
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.
Or: python runtests.py -- Pauli Virtanen
participants (4)
-
Graeme B. Bell -
Nathaniel Smith -
Pauli Virtanen -
Stéfan van der Walt