Copilot commented on code in PR #3165:
URL: https://github.com/apache/sedona/pull/3165#discussion_r3649075569
##########
python/tests/geopandas/test_match_geopandas_series.py:
##########
@@ -784,6 +784,27 @@ def test_has_z(self):
gpd_result = gpd.GeoSeries(geom).has_z
self.check_pd_series_equal(sgpd_result, gpd_result)
+ def test_has_m(self):
+ if parse_version(gpd.__version__) < parse_version("1.1.0"):
+ pytest.skip("geopandas has_m requires version 1.1.0 or higher")
+ if parse_version(shapely.__version__) < parse_version("2.1.0"):
+ pytest.skip("geopandas has_m requires shapely 2.1.0 or higher")
+ if parse_version(shapely.geos_version_string) <
parse_version("3.12.0"):
+ pytest.skip("has_m requires GEOS 3.12.0 or higher")
Review Comment:
`shapely.geos_version_string` is often not PEP 440–compatible (e.g. includes
`-CAPI-...`), so `packaging.version.parse(...)` can raise `InvalidVersion` or
compare incorrectly. Parse just the numeric GEOS version prefix before
comparing to avoid test collection failures / incorrect skips.
This issue also appears on line 915 of the same file.
--
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]