TST: change WKT tests with inconsistent dimensionality for GEOS 3.12
@@ -10,7 +10,9 @@ any dimension which is not present in every coordinate.
import pytest
from shapely import wkt
+from shapely.errors import GEOSException
from shapely.geometry import shape, LineString, Polygon
+from shapely.geos import geos_version
geojson_cases = [
@@ -61,5 +63,10 @@ def test_create_directly(constructor, args):
@pytest.mark.parametrize('wkt_geom,expected', wkt_cases)
def test_create_from_wkt(wkt_geom, expected):
+ if geos_version >= (3, 12, 0):
+ # https://github.com/shapely/shapely/issues/1541
+ with pytest.raises(GEOSException):
+ wkt.loads(wkt_geom)
+ else:
geom = wkt.loads(wkt_geom)
assert geom.wkt == expected
