nose-devs/nose — Issue #61: Nose 0.10 regression when running numpy.testing based NumpyTestCase tests
Author: jpellerin
Created: 2011-12-14 15:57:26+00:00
State: open

I've been a happy user of Nose 0.9.3 with my testcases built
using NumpyTestcase, which is a subclass of unittest.TestCase.
Upgrading to nose 0.10 I run into trouble. None of the tests seem to
work and I get the following error for each test:

ERROR: test_d_d_gaussian (NewCode.tests.test_Waveforms.test_GaussianWavforms)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.5/site-packages/nose-0.10.0-py2.5.egg/nose/case.py", line
151, in run
self.runTest(result)
File
"/usr/lib/python2.5/site-packages/nose-0.10.0-py2.5.egg/nose/case.py", line
169, in runTest
test(result)
File "/usr/lib/python2.5/site-packages/numpy/testing/numpytest.py", line
136, in __call__
nof_errors = len(result.errors)
AttributeError: 'ResultProxy' object has no attribute 'errors'

======================================================================

An extract from the test file that this error refers to:

from __future__ import division

from numpy.testing import *
import numpy as N
from NewCode import Waveforms

class test_GaussianWavforms(NumpyTestCase):
def setUp(self):
self.t = N.linspace(-5,5,21)

def test_d_d_gaussian(self):
assert_almost_equal(N.fromiter(
(Waveforms.d_d_gaussian(1, 1/2, t) for t in self.t), N.float64),
d_d_gaussian, decimal=15)

This is running under Ubuntu Feisty AMD64, python 2.5 and up to date svn
trunk version of numpy.

Google Code Info:
Issue #: 114
Author: nmar...@gmail.com
Created On: 2007-10-15T21:58:29.000Z
Closed On: 2007-10-19T18:54:07.000Z