[SciPy-dev] Two new test failures
Thu Nov 13 15:05:38 CST 2008
On Thu, Nov 13, 2008 at 12:45 PM, <email@example.com> wrote:
>>> The problem, I still didn't manage to figure out, is how and whether the
>>> knownfailureif decorator works with test generators, e.g.
>>> this is my test:
>>> @dec.knownfailureif(True, "This test is known to fail") def
>>> yield check_discrete_chisquare, distname, arg
>>> I get an error instead of a known failure which is not counted towards
>>> failures and errors.
>>> Is there a trick to get the decorators to work with generators or is
>>> this not possible?
>> I think it will work if the decorators are applied to the _check methods
>> instead. But this seems like a bug in Nose -- it should catch SkipTest
>> raised already in the generator method, not only in functions yielded by
I have to run now, but tomorrow I'll write back on this. I've been
tracking down locally how to integrate decorators with test
generators, there's definitely a bug there. Matthew Brett and I
worked on it and I have kludgy but functional solution, and an
improved @skipif that can take a function as the test condition, and
that works with test generators.
I'll get back to you tomorrow with that code, and hopefully we can
work out the details until we have a clean solution to push back into
the numpy test decorators module.
More information about the Scipy-dev