[Numpy-discussion] known failure test decorator not treated as expected by nose

Jonathan March jmarch@enthought....
Wed Oct 6 18:08:51 CDT 2010

It appears that the numpy testing decorators for skipping and for
known failure should behave similarly to each other, at least from
their descriptions here:

Yet in the following example, run under nose, they behave quite differently:

from numpy.testing import  dec

@dec.knownfailureif( True, "known failure test message")
def test_will_fail():

@dec.skipif( True, "skip test message")
def test_to_skip():

The skipped test is marked as "S" as expected, but when the
KnownFailureTest exception is raised, nose handles it as an error
(marked "E" rather than "K" as expected, and printing the stack

It's also interesting that nose has a --no-skip option but no
corresponding option for ignoring known failure decorators.

Why the discrepancy? Who is out of step with whom? This is with numpy
1.4.0 and nosetests 0.11.3

Jonathan March

More information about the NumPy-Discussion mailing list