[SciPy-dev] Using nose

Alan McIntyre alan.mcintyre@gmail....
Sat Oct 4 18:22:42 CDT 2008

On Sat, Oct 4, 2008 at 3:07 PM, Anne Archibald
<peridot.faceted@gmail.com> wrote:
> I have a particular pattern of tests I'd like to implement, and I
> don't know a good way to make nose carry it out. The pattern is this:
> I have a class with a setUp function that creates various variables
> (an array of test data, etc.). I also have a handful of test_whatever
> methods. This works fine. But now I'd like to apply exactly the same
> test methods to a different set of data. My first attempt was to
> simply create a derived class which overrode the setUp method, but
> unfortunately neither unittest nor nose will run tests defined in the
> parent class.


If I understand correctly, I think you might be able to use a
variation of this technique:


Please let me know if that doesn't work (or if the doc isn't clear on


More information about the Scipy-dev mailing list