[SciPy-dev] Two new test failures

Robert Kern robert.kern@gmail....
Thu Nov 13 15:25:45 CST 2008


On Thu, Nov 13, 2008 at 14:03, Pauli Virtanen <pav@iki.fi> wrote:
> Thu, 13 Nov 2008 14:28:33 -0500, josef.pktd wrote:
> [clip]
>> I have problems making my nose tests more complex. All my tests are
>> based on test generators with yield.
>>
>>
>> I did not manage to get the test generators to work inside a TestCase
>> class and using fixtures but I managed to work around that. I added a
>> seed for the random number generator to my test function so now I get
>> deterministic results.
>
> Nose indeed has some problems with test generators in classes inherited
> from TestCase. This is probably a bug in Nose.

No, it's a feature. When encountering a subclass of unittest.TestCase,
nose simply uses unittest semantics. This lets it be backwards
compatible with all unittest test suites, even if they have been
customized. If you need nose features, you need to use functions or
classes that don't subclass from TestCase.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the Scipy-dev mailing list