From 5693f6226b5863d59eefe6a95d8cee01f84b0937 Mon Sep 17 00:00:00 2001 From: "Richard (Rick) Zamora" Date: Thu, 7 Jul 2022 16:51:49 -0500 Subject: [PATCH] Fix assertion in dask_cudf test_struct_explode (#11170) The current implementation of `test_accessor.py::test_struct_explode` relies on `got` having a single partition. However, an [upstream fix](https://github.com/dask/dask/pull/9221) will change the behavior of `from_cudf` to return the **correct** number of partitions (2) soon. Therefore, this PR is just a preemptive fix. Authors: - Richard (Rick) Zamora (https://github.com/rjzamora) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) URL: https://github.com/rapidsai/cudf/pull/11170 --- python/dask_cudf/dask_cudf/tests/test_accessor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/dask_cudf/dask_cudf/tests/test_accessor.py b/python/dask_cudf/dask_cudf/tests/test_accessor.py index f83800bf6b0..6b1627c91e8 100644 --- a/python/dask_cudf/dask_cudf/tests/test_accessor.py +++ b/python/dask_cudf/dask_cudf/tests/test_accessor.py @@ -525,5 +525,5 @@ def test_dask_struct_field_Int_Error(data): def test_struct_explode(data): expect = Series(data).struct.explode() got = dgd.from_cudf(Series(data), 2).struct.explode() - - assert_eq(expect, got.compute()) + # Output index will not agree for >1 partitions + assert_eq(expect, got.compute().reset_index(drop=True))