[SciPy-User] How to run individual failed scipy.test() tests?

sergio sergio_r@mail....
Sun Apr 15 15:12:09 CDT 2012


Hello all,

  I just manually installed python 2.7 with numpy 1.6.1, scipy0.10.1
and nose version 1.1.2 under ubuntu 10.04.

I would like to know how to run failed tests of numpy.test('full') and
scipy.test('full') individually,
and to read a description of what exactly the test does.

Thanks in advance for your help,

Sergio

PS. In what follows I am including the summary
from each test command:

>>> numpy.test('full')
Running unit tests for numpy
NumPy version 1.6.1
NumPy is installed in /home/myProg/Python272/Linux32b/lib/python2.7/
site-
packages/numpy
Python version 2.7.2 (default, Apr 14 2012, 20:45:06) [GCC 4.4.3]
nose version 1.1.2

======================================================================
FAIL: test_kind.TestKind.test_all
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/nose/
case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/numpy
/f2py/tests/test_kind.py", line 30, in test_all
    'selectedrealkind(%s): expected %r but got %r' %  (i,
selected_real_kind(i),
 selectedrealkind(i)))
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/numpy
/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: selectedrealkind(16): expected 10 but got 16

----------------------------------------------------------------------
Ran 3560 tests in 259.496s

FAILED (KNOWNFAIL=3, SKIP=4, failures=1)


>>> scipy.test('full')
......................
======================================================================
ERROR: test_iv_cephes_vs_amos_mass_test (test_basic.TestBessel)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/special/tests/test_basic.py", line 1642, in
test_iv_cephes_vs_amos_mass_test
    c1 = special.iv(v, x)
RuntimeWarning: divide by zero encountered in iv

======================================================================
ERROR: test_fdtri (test_basic.TestCephes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/special/tests/test_basic.py", line 153, in test_fdtri
    cephes.fdtri(1,1,0.5)
RuntimeWarning: invalid value encountered in fdtri

======================================================================
ERROR:
test_continuous_extra.test_cont_extra(<scipy.stats.distributions.loggamma
_gen object at 0xa560c2c>, (0.4141193182605212,), 'loggamma loc, scale
test')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/nose/
case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/tests/test_continuous_extra.py", line 78, in check_loc_scale
    m,v = distfn.stats(*arg)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 1631, in stats
    mu = self._munp(1.0,*goodargs)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 4119, in _munp
    return self._mom0_sc(n,*args)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 1165, in _mom0_sc
    self.b, args=(m,)+args)[0]
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/integrate/quadpack.py", line 247, in quad
    retval =
_quad(func,a,b,args,full_output,epsabs,epsrel,limit,points)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/integrate/quadpack.py", line 314, in _quad
    return
_quadpack._qagie(func,bound,infbounds,args,full_output,epsabs,epsrel,
limit)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 1162, in _mom_integ0
    return x**m * self.pdf(x,*args)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 1262, in pdf
    place(output,cond,self._pdf(*goodargs) / scale)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 4112, in _pdf
    return exp(c*x-exp(x)-gamln(c))
RuntimeWarning: overflow encountered in exp

======================================================================
ERROR:
test_continuous_extra.test_cont_extra(<scipy.stats.distributions.lomax_ge
n object at 0xa56758c>, (1.8771398388773268,), 'lomax loc, scale
test')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/nose/
case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/tests/test_continuous_extra.py", line 78, in check_loc_scale
    m,v = distfn.stats(*arg)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 1617, in stats
    mu, mu2, g1, g2 = self._stats(*args)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 4643, in _stats
    mu, mu2, g1, g2 = pareto.stats(c, loc=-1.0, moments='mvsk')
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 1615, in stats
    mu, mu2, g1, g2 = self._stats(*args,**{'moments':moments})
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 4594, in _stats
    vals = 2*(bt+1.0)*sqrt(b-2.0)/((b-3.0)*sqrt(b))
RuntimeWarning: invalid value encountered in sqrt

======================================================================
ERROR:
test_discrete_basic.test_discrete_extra(<scipy.stats.distributions.hyperg
eom_gen object at 0xa56d7ec>, (30, 12, 6), 'hypergeom entropy nan
test')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/nose/
case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/tests/test_discrete_basic.py", line 199, in check_entropy
    ent = distfn.entropy(*arg)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 6314, in entropy
    place(output,cond0,self.vecentropy(*goodargs))
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/numpy
/lib/function_base.py", line 1862, in __call__
    theout = self.thefunc(*newargs)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 6668, in _entropy
    lvals = where(vals==0.0,0.0,log(vals))
RuntimeWarning: divide by zero encountered in log

======================================================================
ERROR:
test_discrete_basic.test_discrete_extra(<scipy.stats.distributions.hyperg
eom_gen object at 0xa56d7ec>, (21, 3, 12), 'hypergeom entropy nan
test')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/nose/
case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/tests/test_discrete_basic.py", line 199, in check_entropy
    ent = distfn.entropy(*arg)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 6314, in entropy
    place(output,cond0,self.vecentropy(*goodargs))
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/numpy
/lib/function_base.py", line 1862, in __call__
    theout = self.thefunc(*newargs)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 6668, in _entropy
    lvals = where(vals==0.0,0.0,log(vals))
RuntimeWarning: divide by zero encountered in log

======================================================================
ERROR: test_fit (test_distributions.TestFitMethod)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/tests/test_distributions.py", line 439, in test_fit
    vals2 = distfunc.fit(res, optimizer='powell')
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 1874, in fit
    vals = optimizer(func,x0,args=(ravel(data),),disp=0)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/optimize/optimize.py", line 1621, in fmin_powell
    fval, x, direc1 = _linesearch_powell(func, x, direc1,
tol=xtol*100)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/optimize/optimize.py", line 1491, in _linesearch_powell
    alpha_min, fret, iter, num = brent(myfunc, full_output=1, tol=tol)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/optimize/optimize.py", line 1312, in brent
    brent.optimize()
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/optimize/optimize.py", line 1213, in optimize
    tmp2 = (x-v)*(fx-fw)
RuntimeWarning: invalid value encountered in double_scalars

======================================================================
ERROR: test_fix_fit (test_distributions.TestFitMethod)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/tests/test_distributions.py", line 460, in test_fix_fit
    vals2 = distfunc.fit(res,fscale=1)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/stats/distributions.py", line 1874, in fit
    vals = optimizer(func,x0,args=(ravel(data),),disp=0)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/optimize/optimize.py", line 301, in fmin
    and max(abs(fsim[0]-fsim[1:])) <= ftol):
RuntimeWarning: invalid value encountered in subtract

======================================================================
FAIL: test_mio.test_mat4_3d
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/nose/
case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/io/matlab/tests/test_mio.py", line 740, in test_mat4_3d
    stream, {'a': arr}, True, '4')
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/numpy
/testing/utils.py", line 1008, in assert_raises
    return nose.tools.assert_raises(*args,**kwargs)
AssertionError: DeprecationWarning not raised

======================================================================
FAIL: test_datatypes.test_uint64_max
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/nose/
case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/ndimage/tests/test_datatypes.py", line 57, in test_uint64_max
    assert_true(x[1] > (2**63))
AssertionError: False is not true

======================================================================
FAIL: Regression test for #651: better handling of badly conditioned
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/scipy
/signal/tests/test_filter_design.py", line 34, in test_bad_filter
    assert_raises(BadCoefficients, tf2zpk, [1e-15], [1.0, 1.0])
  File "/home/srojas/myProg/Python272/Linux32b/lib/python2.7/site-
packages/numpy
/testing/utils.py", line 1008, in assert_raises
    return nose.tools.assert_raises(*args,**kwargs)
AssertionError: BadCoefficients not raised

----------------------------------------------------------------------
Ran 5836 tests in 2718.233s

FAILED (KNOWNFAIL=14, SKIP=42, errors=8, failures=3)
<nose.result.TextTestResult run=5836 errors=8 failures=3>





More information about the SciPy-User mailing list