From 284753a7a4aced7bb272fc819a5c1f3a03b9cc7c Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Tue, 20 Dec 2011 20:04:32 -0800 Subject: [PATCH] Make test module runnable. --- skimage/morphology/tests/test_morphology.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/skimage/morphology/tests/test_morphology.py b/skimage/morphology/tests/test_morphology.py index 320c775d..c3745662 100644 --- a/skimage/morphology/tests/test_morphology.py +++ b/skimage/morphology/tests/test_morphology.py @@ -1,7 +1,7 @@ import os.path import numpy as np -from numpy.testing import assert_equal +from numpy import testing from skimage import data_dir from skimage.morphology.grey import * @@ -19,7 +19,7 @@ class TestMorphology(): expected_result = matlab_results[arrname] mask = strel_func(k) actual_result = morph_func(lena, mask) - assert_equal(expected_result, actual_result) + testing.assert_equal(expected_result, actual_result) k = k + 1 def test_erode_diamond(self): @@ -116,3 +116,7 @@ class TestEccentricStructuringElements(): tophat = black_tophat(self.white_pixel, s) assert np.all(tophat == 0) + +if __name__ == '__main__': + testing.run_module_suite() +