[SciPy-dev] Re: [Scipy-cvs] world/scipy/tests test_common.py,1.4,1.5

Pearu Peterson pearu at cens.ioc.ee
Tue Oct 15 15:23:29 CDT 2002


On Tue, 15 Oct 2002, Skip Montanaro wrote:

> 
>     pearu> Fixed another typo. This opened a can of errors. Takers?
> 
> How does fixing a typo open a can of errors?  

In this particular case, the file test_common.py had syntax errors (that
obviously looked like typos: missing comma and a comma in place of a
colon) and the scipy testing hooks just ignored this file. After fixing
the syntax errors, the tests in test_common.py were actually executed
(probably for the first time) and not all of them passed...

> What *is* a can of errors?

A bunch of errors (or bugs) that are there but do not show up because of
another error (or bug) that cause the process stoppage before
this bunch of errors could ever become effective.

I thought that the analogy with the expression "a can of worms" was
appropriate in this case.

> Takers for what?

Takers for fixing these errors, of course. I would have fixed them myself
but right now I am in a middle of another task...
The errors are shown below for the record.

Pearu



$ python test_common.py                        
......EEEE
======================================================================
ERROR: check_basic (__main__.test_factorial)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_common.py", line 53, in check_basic
    assert_equal(factorial(-10),0)
  File "/usr/lib/python2.2/site-packages/scipy/common.py", line 20, in
factorial
    raise ValueError, "n must be >= 0"
ValueError: n must be >= 0

======================================================================
ERROR: check_exact (__main__.test_factorial)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_common.py", line 60, in check_exact
    assert_equal(factorial(key,exact=1),resdict[key])
  File "/usr/lib/python2.2/site-packages/scipy/common.py", line 20, in
factorial
    raise ValueError, "n must be >= 0"
ValueError: n must be >= 0

======================================================================
ERROR: check_basic (__main__.test_comb)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_common.py", line 68, in check_basic
    assert_equal(comb(-10,1),0)
  File "/usr/lib/python2.2/site-packages/scipy/common.py", line 40, in
comb
    raise ValueError, "N and k must be non-negative and k <= N"
ValueError: N and k must be non-negative and k <= N

======================================================================
ERROR: check_exact (__main__.test_comb)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_common.py", line 79, in check_exact
    assert_equal(comb(key[0],key[1],exact=1),resdict[key])
  File "/usr/lib/python2.2/site-packages/scipy/common.py", line 40, in
comb
    raise ValueError, "N and k must be non-negative and k <= N"
ValueError: N and k must be non-negative and k <= N

----------------------------------------------------------------------
Ran 10 tests in 0.470s

FAILED (errors=4)





More information about the Scipy-dev mailing list