[SciPy-dev] Nose testing branch - call for - er - testing

Fernando Perez fperez.net@gmail....
Thu Jan 10 23:42:58 CST 2008


On Jan 8, 2008 6:15 PM, Matthew Brett <matthew.brett@gmail.com> wrote:
> Hi,
>
> I've been working for a bit on replacing numpy testing with the nose
> testing framework:
>
> http://somethingaboutorange.com/mrl/projects/nose/
>
> Fernando and the guys started this at the recent Berkeley sprint, and
> I've since been slogging through.

For which you are to be much commended.  I did the easy stuff, but the
enormous amount of rather mind-numbing work to be done wasn't looking
too tasty.  I'm really thankful you took it on, and I'm sure so are
the rest of the users. I really think that a cleaner, more robust,
easier to use testing system will make it easier for us to enforce our
'no untested code' policies :)

Anyway, here's what I'm getting:

1. With current trunk, for reference:

Ran 1955 tests in 120.958s

OK

2. With the testing-cleanup branch:

Ran 2530 tests in 293.217s

FAILED (errors=6)

This is excellent: immediately, it means that there were almost 600
tests not being picked up by the old framework (somehow  I doubt that
in these two weeks anyone contributed that many new tests into trunk
:)

I'm posting the few errors below for reference:

======================================================================
ERROR: Failure: <type 'exceptions.ImportError'>(cannot import name _bspline)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fperez/usr/local/lib/python2.5/site-packages/nose-0.10.0-py2.5.egg/nose/loader.py",
line 361, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/fperez/usr/local/lib/python2.5/site-packages/nose-0.10.0-py2.5.egg/nose/importer.py",
line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/fperez/usr/local/lib/python2.5/site-packages/nose-0.10.0-py2.5.egg/nose/importer.py",
line 84, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/stats/models/tests/test_bspline.py",
line 9, in <module>
    import scipy.stats.models.bspline as B
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/stats/models/bspline.py",
line 23, in <module>
    from scipy.stats.models import _bspline
ImportError: cannot import name _bspline

======================================================================
ERROR: test_huber (test_scale.TestScale)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/stats/models/tests/test_scale.py",
line 35, in test_huber
    m = scale.huber(X)
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/stats/models/robust/scale.py",
line 82, in __call__
    for donothing in self:
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/stats/models/robust/scale.py",
line 102, in next
    scale = N.sum(subset * (a - mu)**2, axis=self.axis) / (self.n *
Huber.gamma - N.sum(1. - subset, axis=self.axis) * Huber.c**2)
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/numpy/core/fromnumeric.py",
line 866, in sum
    return sum(axis, dtype, out)
TypeError: only length-1 arrays can be converted to Python scalars

======================================================================
ERROR: test_huberaxes (test_scale.TestScale)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/stats/models/tests/test_scale.py",
line 40, in test_huberaxes
    m = scale.huber(X, axis=0)
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/stats/models/robust/scale.py",
line 82, in __call__
    for donothing in self:
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/stats/models/robust/scale.py",
line 102, in next
    scale = N.sum(subset * (a - mu)**2, axis=self.axis) / (self.n *
Huber.gamma - N.sum(1. - subset, axis=self.axis) * Huber.c**2)
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/numpy/core/fromnumeric.py",
line 866, in sum
    return sum(axis, dtype, out)
TypeError: only length-1 arrays can be converted to Python scalars

======================================================================
ERROR: Failure: <type 'exceptions.ImportError'>(No module named convolve)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fperez/usr/local/lib/python2.5/site-packages/nose-0.10.0-py2.5.egg/nose/loader.py",
line 361, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/fperez/usr/local/lib/python2.5/site-packages/nose-0.10.0-py2.5.egg/nose/importer.py",
line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/fperez/usr/local/lib/python2.5/site-packages/nose-0.10.0-py2.5.egg/nose/importer.py",
line 84, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/stsci/image/__init__.py",
line 2, in <module>
    from _image import *
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/stsci/image/_image.py",
line 2, in <module>
    import convolve
ImportError: No module named convolve

======================================================================
ERROR: no_test_no_check_return (test_wx_spec.TestWxConverter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/weave/tests/test_wx_spec.py",
line 104, in no_test_no_check_return
    mod.compile()
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/weave/ext_tools.py",
line 365, in compile
    verbose = verbose, **kw)
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/weave/build_tools.py",
line 271, in build_extension
    setup(name = module_name, ext_modules = [ext],verbose=verb)
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/numpy/distutils/core.py",
line 178, in setup
    return old_setup(**new_attr)
  File "distutils/core.py", line 168, in setup
CompileError: error: Command "g++ -pthread -fno-strict-aliasing
-DNDEBUG -g -O2 -Wall -fPIC
-I/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/weave
-I/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/weave/scxx
-I/home/fperez/usr/opt/lib/python2.5/site-packages/numpy/core/include
-I/usr/include/python2.5 -c
/home/fperez/fp/photo/digicam/wx_return.cpp -o
/tmp/fperez/python25_intermediate/compiler_2b6a6480521b55c80243706014f9928a/home/fperez/fp/photo/digicam/wx_return.o"
failed with exit status 1

======================================================================
ERROR: test_var_in (test_wx_spec.TestWxConverter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/weave/tests/test_wx_spec.py",
line 63, in test_var_in
    mod.compile()
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/weave/ext_tools.py",
line 365, in compile
    verbose = verbose, **kw)
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/weave/build_tools.py",
line 271, in build_extension
    setup(name = module_name, ext_modules = [ext],verbose=verb)
  File "/home/fperez/usr/opt/lib/python2.5/site-packages/numpy/distutils/core.py",
line 178, in setup
    return old_setup(**new_attr)
  File "distutils/core.py", line 168, in setup
CompileError: error: Command "g++ -pthread -fno-strict-aliasing
-DNDEBUG -g -O2 -Wall -fPIC
-I/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/weave
-I/home/fperez/usr/opt/lib/python2.5/site-packages/scipy/weave/scxx
-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-I/home/fperez/usr/opt/lib/python2.5/site-packages/numpy/core/include
-I/usr/include/python2.5 -c
/home/fperez/fp/photo/digicam/wx_var_in.cpp -o
/tmp/fperez/python25_intermediate/compiler_2b6a6480521b55c80243706014f9928a/home/fperez/fp/photo/digicam/wx_var_in.o
-I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6
-DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-DNO_GCC_PRAGMA -I/usr/lib/wx/include/gtk2-unicode-release-2.6
-I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA" failed with
exit status 1


The two last ones are in weave, and I recall Min mentioning they were
simply not being picked up before, and that these were the last ones
he didn't have a chance to fully clean up.  The fact that they are
WX-specific means I worry even less, since WX support isn't quite
'core' weave functionality (not that they shouldn't get fixed, but
they don't seem critical).

The other four probably warrant a look, but I'm headed to bed now, and
before I want to also finish testing the ETS release...

Overall, I think this is excellent work, and again, Thanks! In order
to minimize the headaches of tracking branches, I'd vote for Matthew's
work to be merged into the trunk ASAP.  Is there any good reason to
wait  longer, other than further testing (which is more likely to
happen if it goes into trunk)?

Good job!

f


More information about the Scipy-dev mailing list