[Numpy-discussion] with np.testing.assert_raises still requires nose.

Matthew Brett matthew.brett at gmail.com
Tue Jan 23 11:34:25 EST 2018


On Tue, Jan 23, 2018 at 10:04 AM, Andrew Nelson <andyfaff at gmail.com> wrote:
> Dear np list,
> from a recent scipy PR (https://github.com/scipy/scipy/pull/8322) it appears
> that the `np.testing.assert_raises` context manager still requires nose to
> be installed:
> https://ci.appveyor.com/project/scipy/scipy/build/1.0.1550/job/s5nq8xqd0n72feqf
> The appveyor test is using numpy-1.14.0
> This doesn't seem to be an issue on our travis tests, only the windows
> tests. Is this a bug?

I noticed that too.  For my own project I ended up adding a replacement stub:

from unittest import TestCase

assert_raises = TestCase().assertRaises

I think that's all nose is doing, but I couldn't find the code path in
a quick grep.



More information about the NumPy-Discussion mailing list