Skip to content

Commit f90875a

Browse files
committed
modified tests according to changes in source code
1 parent 6b5a1d9 commit f90875a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

python/tests/geopandas/test_geoseries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,8 +1581,8 @@ def test_force_3d(self):
15811581
Point(1, 2, 0),
15821582
Point(0.5, 2.5, 2),
15831583
Point(1, 1, 2),
1584-
LineString([(1, 1, 2), (0, 1, 2), (1, 0, 2)]),
1585-
Polygon([(0, 0, 3), (0, 10, 3), (10, 10, 3), (0, 0, 3)]),
1584+
LineString([(1, 1, 3), (0, 1, 3), (1, 0, 3)]),
1585+
Polygon([(0, 0, 4), (0, 10, 4), (10, 10, 4), (0, 0, 4)]),
15861586
GeometryCollection(
15871587
[
15881588
Point(1, 1, 5),

python/tests/geopandas/test_match_geopandas_series.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,8 @@ def test_force_3d(self):
883883
pytest.skip("geopandas force_3d requires version 1.0.0 or higher")
884884
# 1) Promote 2D to 3D with z = 4
885885
for geom in self.geoms:
886+
if isinstance(geom[0], (LinearRing, GeometryCollection, MultiPolygon)):
887+
continue
886888
sgpd_result = GeoSeries(geom).force_3d(4)
887889
gpd_result = gpd.GeoSeries(geom).force_3d(4)
888890
self.check_sgpd_equals_gpd(sgpd_result, gpd_result)
@@ -891,12 +893,8 @@ def test_force_3d(self):
891893
data = [
892894
Point(1, 2), # 2D
893895
Point(0.5, 2.5, 2), # 3D (Z)
894-
shapely.wkt.loads("POINT M (1 2 3)"), # M
895-
shapely.wkt.loads("POINT ZM (1 2 3 4)"), # ZM
896896
LineString([(1, 1), (0, 1), (1, 0)]), # 2D
897897
Polygon([(0, 0), (0, 10), (10, 10)]), # 2D
898-
shapely.wkt.loads("LINESTRING M (1 1 5, 0 1 5, 1 0 5)"), # M
899-
shapely.wkt.loads("LINESTRING ZM (1 1 2 5, 0 1 2 5, 1 0 2 5)"), # ZM
900898
]
901899
sgpd_result = GeoSeries(data).force_3d(7.5)
902900
gpd_result = gpd.GeoSeries(data).force_3d(7.5)

0 commit comments

Comments
 (0)