[Numpy-tickets] [NumPy] #957: decorators don't work with test generators
NumPy
numpy-tickets@scipy....
Mon Nov 24 00:50:55 CST 2008
#957: decorators don't work with test generators
----------------------------+-----------------------------------------------
Reporter: jarrod.millman | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 1.3.0
Component: numpy.testing | Version: devel
Severity: normal | Keywords:
----------------------------+-----------------------------------------------
Nose has some problems with test generators in classes inherited from
{{{TestCase}}}. For example,
{{{
@dec.knownfailureif(True, "This test is known to fail")
def test_discrete_rvs_cdf_fail():
distknownfail = [ ['logser', (0.6,)]]
for distname, arg in distknownfail:
if debug:
print distname
yield check_discrete_chisquare, distname, arg
}}}
results in:
{{{
...........E
======================================================================
ERROR: test_discrete_chisquare.test_discrete_rvs_cdf_fail
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Programs\Python25\lib\site-
packages\nose-0.10.4-py2.5.egg\nose\case.p
y", line 182, in runTest
self.test(*self.arg)
File "C:\Programs\Python25\lib\site-
packages\numpy\testing\decorators.py", line 119, in skipper
raise KnownFailureTest, msg
KnownFailureTest: This test is known to fail
----------------------------------------------------------------------
Ran 12 tests in 0.781s
FAILED (errors=1)
}}}
--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/957>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list