[Numpy-discussion] numpy testing

Brian Hawthorne brian.lee.hawthorne at gmail.com
Thu May 24 07:56:35 EDT 2007


Ah, thanks for the tip.  That did the trick.

Cheers
-Brian

On 5/24/07, Pearu Peterson <pearu at cens.ioc.ee> wrote:
>
>
>
> Brian Hawthorne wrote:
> > Hello,
> > I'm having a bit of trouble with numpy testing not finding my tests.  It
> > seems like a bug, but maybe it's a subtle feature.  I constructed the
> > simplest possible straw man to illustrate my problem (attached as
> foo.tgz).
> > The directory structure looks like this:
> >
> > a/
> >  __init__.py
> >  foo.py
> >  tests/
> >    test_foo.py
> >
> > To witness the problem:
> >
> > % tar zxf foo.tgz
> > % python -c 'import a; a.test()'
> > % python -c 'import a; a.testall()'
> >
> > The test method (of NumpyTest class) does not pick up the test, but
> testall
> > does.  I think I've followed all the naming rules, even included test_,
> > check_, and bench_ methods in the test case, in case they were treated
> > differently.  Any suggestions?
>
> This is because the package does not import foo. If you would add
> import foo
> to a/__init__.py, all tests will be picked up.
>
> Regards,
> Pearu
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070524/dc1c02c8/attachment.html>


More information about the NumPy-Discussion mailing list