[Numpy-discussion] problem with NumPy test harness in 1.1.0?
David Brown
dbrown at ucar.edu
Tue Jul 1 18:53:49 EDT 2008
Hi,
Our code depends on NumPy and we have been taking advantage of the
NumPy test harness
to create test scripts for new features as we develop them. As
recently as version 1.1.0.dev5064
we had no problem running our tests from the directory in which they
live, e.g.:
python test_script.py
.....<much output>
.
----------------------------------------------------------------------
Ran 10 tests in 0.397s
OK
However, with the released version NumPy 1.1.0 none of our tests work
any longer and instead we get this
error message:
Traceback (most recent call last):
File "test_mfio.py", line 426, in <module>
NumpyTest().run()
File "/usr/local/lib/python2.5/site-packages/numpy/testing/
numpytest.py", line 655, in run
testcase_pattern=options.testcase_pattern)
File "/usr/local/lib/python2.5/site-packages/numpy/testing/
numpytest.py", line 575, in test
level, verbosity)
File "/usr/local/lib/python2.5/site-packages/numpy/testing/
numpytest.py", line 453, in _test_suite_from_all_tests
importall(this_package)
File "/usr/local/lib/python2.5/site-packages/numpy/testing/
numpytest.py", line 681, in importall
for subpackage_name in os.listdir(package_dir):
OSError: [Errno 2] No such file or directory: ''
Looking through the archives I have found a reference to the same
error at
http://www.nabble.com/NumpyTest-problem-td17603890.html.
However, this thread is focused on the use of NumpyTest for test
scripts within the NumPy source tree and the suggestions
do not seem to apply to our situation.
My question is whether using NumpyTest for our own tests is
considered to be a proper application of the test module.
If not why not?
If it is, is there some modification we can make to our tests to make
them work with NumpyTest as it is now configured?
Or is this possibly a bug in NumPyTest?
Dave Brown
PyNGL/PyNIO development team
More information about the NumPy-Discussion
mailing list