[NumPy-Tickets] [NumPy] #1497: Make nose --detailed-errors optional
NumPy Trac
numpy-tickets@scipy....
Sun May 30 09:42:43 CDT 2010
#1497: Make nose --detailed-errors optional
--------------------------------------+-------------------------------------
Reporter: jseabold | Owner: somebody
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.testing | Version: devel
Keywords: nose numpy.testing tests |
--------------------------------------+-------------------------------------
Right now the use of the --detailed-errors flag for nose tests is not
optional. I have attached a patch to make it optional. The default
behavior of using --detailed-errors is not changed (though maybe it should
be?), as it is useful for the build bots. I find it to be extra noise
while debugging tests though.
Consider a failure with detailed errors flag in scipy r6447:
scipy.test()
{{{
======================================================================
FAIL: test_mio.test_mat4_3d(<type 'exceptions.DeprecationWarning'>,
<functools.partial object at 0x479a418>, <StringIO.StringIO instance at
0x753c6c8>, {'a': array([[[ 0, 1, 2, 3],
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-
packages/nose-0.11.1-py2.6.egg/nose/case.py", line 183, in runTest
self.test(*self.arg)
File "/usr/local/lib/python2.6/dist-packages/numpy/testing/utils.py",
line 982, in assert_raises
return nose.tools.assert_raises(*args,**kwargs)
AssertionError: DeprecationWarning not raised
if hasattr(excClass,'__name__'): 'DeprecationWarning' =
excClass.'unittest'
else: 'DeprecationWarning' = str(excClass)
>> raise self.failureException, "%s not raised" % 'DeprecationWarning'
}}}
The same one without the flag:
scipy.test(extra_argv=[])
{{{
======================================================================
FAIL: test_mio.test_mat4_3d(<type 'exceptions.DeprecationWarning'>,
<functools.partial object at 0x479a418>, <StringIO.StringIO instance at
0x6ac1248>, {'a': array([[[ 0, 1, 2, 3],
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-
packages/nose-0.11.1-py2.6.egg/nose/case.py", line 183, in runTest
self.test(*self.arg)
File "/usr/local/lib/python2.6/dist-packages/numpy/testing/utils.py",
line 982, in assert_raises
return nose.tools.assert_raises(*args,**kwargs)
AssertionError: DeprecationWarning not raised
}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1497>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list