From f070b3c9a97b16aebc8500af703ed713e170f519 Mon Sep 17 00:00:00 2001 From: Clark Zinzow Date: Fri, 5 Feb 2021 22:21:41 -0700 Subject: [PATCH] [dask-on-ray] Fix Dask-on-Ray test: Python 3 dictionary .values() is a view, and is not indexable (#13945) --- python/ray/tests/test_dask_scheduler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/ray/tests/test_dask_scheduler.py b/python/ray/tests/test_dask_scheduler.py index 28a98a76e..54ba40521 100644 --- a/python/ray/tests/test_dask_scheduler.py +++ b/python/ray/tests/test_dask_scheduler.py @@ -35,7 +35,9 @@ def test_ray_dask_basic(ray_start_regular_shared): def test_ray_dask_persist(ray_start_regular_shared): arr = da.ones(5) + 2 result = arr.persist(scheduler=ray_dask_get) - np.testing.assert_array_equal(result.dask.values()[0], np.ones(5) + 2) + np.testing.assert_array_equal( + next(iter(result.dask.values())), + np.ones(5) + 2) if __name__ == "__main__":