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

Alan McIntyre alan.mcintyre@gmail....
Sun Jun 8 06:15:40 CDT 2008

Hi all,

Later this week (after finals are done ;) I'll be checking in some
changes to switch NumPy tests over to nose, and I just wanted to give
the list a heads up and see if there's any concerns, etc.

On Mon, Jun 2, 2008 at 11:04 PM, Pierre GM <pgmdevlist@gmail.com> wrote:
> * is there a way to select only some tests ? It used to be a time not that
> long ago (less than 6 weeks) where I was able to run one specific test of a
> suite (for example, numpy/ma/tests/test_core.py), and that's no longer the
> case.

As Christopher pointed out, you should be able to use the nosetests
script to run tests that way if you rename your methods.  Once I check
in my changes, all the test modules will have the test and utility
function/method names updated so that they'll work with the nose

Right now there's "if __name__ == '__main__'" boilerplate at the end
of every test module; nose can find and run tests without that being
there.  I wanted to get the list's take on removing that--it just
means that if you want to run the tests in one module, you have to do
"nosetests numpy/blah/test_foo.py" instead of "python
numpy/blah/test_foo.py".  Is there a reason not to remove that
boilerplate since we've already decided to use nose?

> * Running the whole test suite with import numpy; numpy.test() works fine, but
> I don't really need to test the rest of numpy when I'm messing with
> numpy.ma...

I will be including a "test" method in as many subpackages as
possible, so that you can do numpy.ma.test() and such.

If anybody has any concerns or requests for the test suite, please let
me know and I'll see what I can do.


More information about the Numpy-discussion mailing list