mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 21:08:24 +08:00
Use assert_raises instead of @raises.
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user