From 7665281c4a76f2d0799bf154b4999853f401fe8b Mon Sep 17 00:00:00 2001 From: Ankit Agrawal Date: Mon, 12 Aug 2013 16:27:35 +0530 Subject: [PATCH] Lowercasing variables; removing unused import; replacing _remove by _mask --- skimage/feature/tests/test_censure.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/skimage/feature/tests/test_censure.py b/skimage/feature/tests/test_censure.py index 14e97a39..9acdd2e9 100644 --- a/skimage/feature/tests/test_censure.py +++ b/skimage/feature/tests/test_censure.py @@ -1,7 +1,6 @@ import numpy as np from numpy.testing import assert_array_equal, assert_raises from skimage.data import moon -from skimage.util import img_as_ubyte from skimage.feature import censure_keypoints @@ -11,12 +10,12 @@ def test_censure_keypoints_color_image_unsupported_error(): assert_raises(ValueError, censure_keypoints, img) -def test_censure_keypoints_moon_image_DoB(): +def test_censure_keypoints_moon_image_dob(): """Verify the actual Censure keypoints and their corresponding scale with the expected values for DoB filter.""" img = moon() - actual_kp_DoB, actual_scale = censure_keypoints(img, 7, 'DoB', 0.15) - expected_kp_DoB = np.array([[ 21, 497], + actual_kp_dob, actual_scale = censure_keypoints(img, 7, 'DoB', 0.15) + expected_kp_dob = np.array([[ 21, 497], [ 36, 46], [119, 350], [185, 177], @@ -27,7 +26,7 @@ def test_censure_keypoints_moon_image_DoB(): [467, 260]]) expected_scale = np.array([3, 4, 4, 2, 2, 3, 2, 2, 2]) - assert_array_equal(expected_kp_DoB, actual_kp_DoB) + assert_array_equal(expected_kp_dob, actual_kp_dob) assert_array_equal(expected_scale, actual_scale) @@ -35,9 +34,9 @@ def test_censure_keypoints_moon_image_Octagon(): """Verify the actual Censure keypoints and their corresponding scale with the expected values for Octagon filter.""" img = moon() - actual_kp_Octagon, actual_scale = censure_keypoints(img, 7, 'Octagon', + actual_kp_octagon, actual_scale = censure_keypoints(img, 7, 'Octagon', 0.15) - expected_kp_Octagon = np.array([[ 21, 496], + expected_kp_octagon = np.array([[ 21, 496], [ 35, 46], [287, 250], [356, 239], @@ -45,7 +44,7 @@ def test_censure_keypoints_moon_image_Octagon(): expected_scale = np.array([3, 4, 2, 2, 2]) - assert_array_equal(expected_kp_Octagon, actual_kp_Octagon) + assert_array_equal(expected_kp_octagon, actual_kp_octagon) assert_array_equal(expected_scale, actual_scale) @@ -53,8 +52,8 @@ def test_censure_keypoints_moon_image_STAR(): """Verify the actual Censure keypoints and their corresponding scale with the expected values for STAR filter.""" img = moon() - actual_kp_STAR, actual_scale = censure_keypoints(img, 7, 'STAR', 0.15) - expected_kp_STAR = np.array([[ 21, 497], + actual_kp_star, actual_scale = censure_keypoints(img, 7, 'STAR', 0.15) + expected_kp_star = np.array([[ 21, 497], [ 36, 46], [117, 356], [185, 177], @@ -67,7 +66,7 @@ def test_censure_keypoints_moon_image_STAR(): expected_scale = np.array([3, 3, 6, 2, 3, 2, 3, 5, 2, 2]) - assert_array_equal(expected_kp_STAR, actual_kp_STAR) + assert_array_equal(expected_kp_star, actual_kp_star) assert_array_equal(expected_scale, actual_scale)