From 8e695f87344a8986b7d43a149200f41e5088984a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Wed, 30 Oct 2013 22:41:20 +0100 Subject: [PATCH 1/2] Add rank filter tests as data dir --- skimage/filter/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/skimage/filter/setup.py b/skimage/filter/setup.py index 33ad97df..359c3b68 100644 --- a/skimage/filter/setup.py +++ b/skimage/filter/setup.py @@ -11,6 +11,7 @@ def configuration(parent_package='', top_path=None): config = Configuration('filter', parent_package, top_path) config.add_data_dir('tests') + config.add_data_dir('rank/tests') cython(['_ctmf.pyx'], working_path=base_path) cython(['_denoise_cy.pyx'], working_path=base_path) From 22273a51602f0676fd9ce239783b38028e2525f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Wed, 30 Oct 2013 23:07:23 +0100 Subject: [PATCH 2/2] Fix 16bit rank filter test in python 3.x --- skimage/filter/rank/tests/test_rank.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/filter/rank/tests/test_rank.py b/skimage/filter/rank/tests/test_rank.py index 1d573b81..cedeb92d 100644 --- a/skimage/filter/rank/tests/test_rank.py +++ b/skimage/filter/rank/tests/test_rank.py @@ -437,7 +437,7 @@ def test_16bit(): image[10, 10] = value assert rank.minimum(image, selem)[10, 10] == 0 assert rank.maximum(image, selem)[10, 10] == value - assert rank.mean(image, selem)[10, 10] == value / selem.size + assert rank.mean(image, selem)[10, 10] == int(value / selem.size) def test_bilateral():