[Numpy-discussion] numpy testing
Brian Hawthorne
brian.lee.hawthorne at gmail.com
Thu May 24 00:42:34 EDT 2007
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?
I encountered this problem while attempting to isolate another (maybe
related) problem with numpy testing. I'm working on the nipy project (
neuroimaging.scipy.org) and we are using the numpy test system. During a
refactoring session, I noticed that when I moved some existing functionality
(along with its tests) into a new identically named module under a different
package (like a.b.foo and a.c.foo), these particular tests were no longer
found. I thought it might have something to do with the modules having the
same name, but when I tried to isolate the problem in a mockup, I ran into
the problem described above. So, first things first. Maybe it's something
really dumb that I can't see because I've been staring at it for too long.
Thanks in advance for any suggestions,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070523/6856c97a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.tgz
Type: application/x-gzip
Size: 364 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070523/6856c97a/attachment.bin>
More information about the NumPy-Discussion
mailing list