From 8de055c459e79d106d6e40f550e1c2a0431695e1 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Fri, 7 Jun 2024 06:56:17 -1000 Subject: [PATCH] Fix test_intersections.py post cudf refactor (#1398) closes #1395 `pairwise_linestring_intersection`, tested in this file, returns a `cudf.Column` for one of it's arguments and used `to_pandas` to test it's output. in 24.08, the output of `Column.to_pandas` was changed to a `pandas.Index` instead of a `pandas.Series` so modified the test accordingly Authors: - Matthew Roeschke (https://github.com/mroeschke) Approvers: - Mark Harris (https://github.com/harrism) - Paul Taylor (https://github.com/trxcllnt) - Michael Wang (https://github.com/isVoid) URL: https://github.com/rapidsai/cuspatial/pull/1398 --- .../cuspatial/tests/basicpreds/test_intersections.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/cuspatial/cuspatial/tests/basicpreds/test_intersections.py b/python/cuspatial/cuspatial/tests/basicpreds/test_intersections.py index 993eb72a8..d2220197b 100644 --- a/python/cuspatial/cuspatial/tests/basicpreds/test_intersections.py +++ b/python/cuspatial/cuspatial/tests/basicpreds/test_intersections.py @@ -1,3 +1,5 @@ +# Copyright (c) 2024, NVIDIA CORPORATION. + import geopandas as gpd import pandas as pd from geopandas.testing import assert_geoseries_equal @@ -13,7 +15,9 @@ def run_test(s1, s2, expect_offset, expect_geom, expect_ids): cuspatial.from_geopandas(s1), cuspatial.from_geopandas(s2) ) - assert_series_equal(expect_offset, offset.to_pandas(), check_dtype=False) + assert_series_equal( + expect_offset, pd.Series(offset.to_pandas()), check_dtype=False + ) assert_geoseries_equal(expect_geom, geoms.to_geopandas()) assert_frame_equal(expect_ids, ids.to_pandas())