petern48 commented on code in PR #2421:
URL: https://github.com/apache/sedona/pull/2421#discussion_r2452284193
##########
python/tests/geopandas/test_geoseries.py:
##########
@@ -235,23 +235,23 @@ def test_x(self):
)
result = geoseries.x.to_pandas()
Review Comment:
```suggestion
result = geoseries.x
```
##########
python/tests/geopandas/test_geoseries.py:
##########
@@ -163,7 +163,7 @@ def test_plot(self):
def test_area(self):
result = self.geoseries.area.to_pandas()
expected = pd.Series([0.0, 0.0, 5.23, 5.23])
- assert_series_equal(result, expected)
+ self.check_pd_series_equal(result, expected)
Review Comment:
```suggestion
result = self.geoseries.area
expected = pd.Series([0.0, 0.0, 5.23, 5.23])
self.check_pd_series_equal(result, expected)
```
##########
python/tests/geopandas/test_geoseries.py:
##########
@@ -235,23 +235,23 @@ def test_x(self):
)
result = geoseries.x.to_pandas()
Review Comment:
Since you replaced the `assert_series_equal()` function below already, we
just need to remove the `.to_pandas()` call. Now, please replicate this pattern
of changes for the rest.
##########
python/tests/geopandas/test_geoseries.py:
##########
@@ -716,7 +716,7 @@ def test_is_valid_reason(self):
None,
]
)
- assert_series_equal(result, expected)
+ self.check_pd_series_equal(result, expected)
Review Comment:
Careful, there are also some cases like this, where the `.to_pandas()` call
is higher up and easy to miss. We should remove the `.to_pandas()` call here
too so that `self.check_pd_series_equal()` passes.
##########
python/tests/geopandas/test_geoseries.py:
##########
@@ -163,7 +163,7 @@ def test_plot(self):
def test_area(self):
result = self.geoseries.area.to_pandas()
expected = pd.Series([0.0, 0.0, 5.23, 5.23])
- assert_series_equal(result, expected)
+ self.check_pd_series_equal(result, expected)
Review Comment:
Here's what the overall change each time should look like:
1. Remove the `.to_pandas()` call.
2. Replace `assert_series_equal` with `self.check_pd_series_equal`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]