[Numpy-discussion] Regression test

Ralf Gommers ralf.gommers at gmail.com
Tue Dec 24 05:02:27 EST 2013

On Tue, Dec 24, 2013 at 7:35 AM, janani padmanabhan <aspire.janani at gmail.com
> wrote:

> Hello folks!
> I am a newbie, and I want to know how to add a regression test.
> Intuitively, I simply executed the corresponding test.py and got errors,
> even before having made any changes in the source code. How do I proceed?

You run the numpy test suite by:

    import numpy as np
    np.test()  # has some options, like 'full' and verbose=2

If you're developing it may also be helpful to use:

    python runtests.py

This builds numpy and runs the tests at once. If you change something in
the git repo and re-run this command, it's very fast due to only rebuilding
the part that changed.

After you can run the test, you can add your new test by following the
examples that are already there. For any source file filename.py there's a
corresponding file tests/test_filename.py


Thanking you in anticipation
> Janani
> (jennystone)
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131224/8e0360fe/attachment.html>

More information about the NumPy-Discussion mailing list