From 9ff734cdbc35eff325617ffc432e0dfd79b3dba2 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 10 Feb 2019 16:43:59 -0500 Subject: [PATCH] Compute `find_objects` before checking values This is important for changes that will be made to `find_objects`, which require returning a `Delayed` object instead of a `list` of `Delayed` objects. --- tests/test_dask_image/test_ndmeasure/test_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_dask_image/test_ndmeasure/test_core.py b/tests/test_dask_image/test_ndmeasure/test_core.py index e008a065..50f93020 100644 --- a/tests/test_dask_image/test_ndmeasure/test_core.py +++ b/tests/test_dask_image/test_ndmeasure/test_core.py @@ -202,12 +202,12 @@ def test_find_objects(max_labels): dask_image.ndmeasure.find_objects(d_l, max_labels) else: n_r = spnd.find_objects(n_l, max_labels) - d_r = dask_image.ndmeasure.find_objects(d_l, max_labels) + d_r = dask_image.ndmeasure.find_objects(d_l, max_labels).compute() assert len(n_r) == len(d_r) for i in irange(len(n_r)): - assert n_r[i] == d_r[i].compute() + assert n_r[i] == d_r[i] @pytest.mark.parametrize(