diff --git a/skimage/filters/tests/test_gaussian.py b/skimage/filters/tests/test_gaussian.py index 59a0dfaf..14c95d0e 100644 --- a/skimage/filters/tests/test_gaussian.py +++ b/skimage/filters/tests/test_gaussian.py @@ -1,21 +1,16 @@ -from nose.tools import raises import numpy as np +from numpy.testing import assert_raises from skimage.filters._gaussian import gaussian_filter from skimage._shared._warnings import expected_warnings -@raises(ValueError) def test_negative_sigma(): a = np.zeros((3, 3)) a[1, 1] = 1. - gaussian_filter(a, -1.0) - - -@raises(ValueError) -def test_multiple_negative_sigma(): - a = np.zeros((3, 3)) - a[1, 1] = 1. - gaussian_filter(a, [-1.0, 1.0]) + assert_raises(ValueError, gaussian_filter, a, sigma=-1.0) + assert_raises(ValueError, gaussian_filter, a, sigma=[-1.0, 1.0]) + assert_raises(ValueError, gaussian_filter, a, + sigma=np.asarray([-1.0, 1.0])) def test_null_sigma():