diff --git a/skimage/filter/tests/test_filter_import.py b/skimage/filter/tests/test_filter_import.py deleted file mode 100644 index 70841df5..00000000 --- a/skimage/filter/tests/test_filter_import.py +++ /dev/null @@ -1,8 +0,0 @@ -from warnings import catch_warnings, simplefilter - -def test_import_filter(): - with catch_warnings(): - simplefilter('ignore') - from skimage import filter as F - - assert('sobel' in dir(F)) diff --git a/skimage/filters/tests/test_filter_import.py b/skimage/filters/tests/test_filter_import.py new file mode 100644 index 00000000..115b1182 --- /dev/null +++ b/skimage/filters/tests/test_filter_import.py @@ -0,0 +1,11 @@ +from skimage._shared.utils import all_warnings, skimage_deprecation +from warnings import catch_warnings, simplefilter +from numpy.testing import assert_warns + +def import_filter(): + from skimage import filter as F + assert('sobel' in dir(F)) + +def test_filter_import(): + with all_warnings(): + assert_warns(skimage_deprecation, import_filter)