From ec15ec4536df0c56305f7c5378beba79ef0ab2e8 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Mon, 26 May 2014 01:21:58 +0200 Subject: [PATCH] Correctly apply catch_warnings() --- skimage/morphology/tests/test_ccomp.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/skimage/morphology/tests/test_ccomp.py b/skimage/morphology/tests/test_ccomp.py index 69b4b9e5..e934a5b7 100644 --- a/skimage/morphology/tests/test_ccomp.py +++ b/skimage/morphology/tests/test_ccomp.py @@ -26,7 +26,7 @@ class TestConnectedComponents: def test_random(self): x = (np.random.random((20, 30)) * 5).astype(np.int) - with catch_warnings(skimage_deprecation): + with catch_warnings(): labels = label(x) n = labels.max() @@ -38,13 +38,13 @@ class TestConnectedComponents: x = np.array([[0, 0, 1], [0, 1, 0], [1, 0, 0]]) - with catch_warnings(skimage_deprecation): + with catch_warnings(): assert_array_equal(label(x), x) def test_4_vs_8(self): x = np.array([[0, 1], [1, 0]], dtype=int) - with catch_warnings(skimage_deprecation): + with catch_warnings(): assert_array_equal(label(x, 4), [[0, 1], [2, 3]]) @@ -57,7 +57,7 @@ class TestConnectedComponents: [1, 1, 5], [0, 0, 0]]) - with catch_warnings(skimage_deprecation): + with catch_warnings(): assert_array_equal(label(x), [[0, 1, 1], [0, 0, 2], [3, 3, 3]]) @@ -92,7 +92,7 @@ class TestConnectedComponents: [0, 0, 6], [5, 5, 5]]) - with catch_warnings(skimage_deprecation): + with catch_warnings(): assert_array_equal(label(x, return_num=True)[1], 4) assert_array_equal(label(x, background=0, return_num=True)[1], 3)