diff --git a/geo_extensions/transformer.py b/geo_extensions/transformer.py index 9fd18fd..befc67d 100644 --- a/geo_extensions/transformer.py +++ b/geo_extensions/transformer.py @@ -65,7 +65,7 @@ def to_polygons(obj: Geometry) -> TransformationResult: yield obj return - raise Exception(f"WKT: '{obj}' is not a Polygon or MultiPolygon") + raise Exception(f"'{obj}' is not a Polygon or MultiPolygon") def _apply_transformations( diff --git a/tests/test_transformer.py b/tests/test_transformer.py index c48edba..d792ddc 100644 --- a/tests/test_transformer.py +++ b/tests/test_transformer.py @@ -185,7 +185,7 @@ def test_from_geo_json_multipolygon(simplify_transformer): def test_from_wkt_bad_points(simplify_transformer): with pytest.raises( Exception, - match=r"WKT: 'POINT \(30 10\)' is not a Polygon or MultiPolygon", + match=r"'POINT \(30 10\)' is not a Polygon or MultiPolygon", ): simplify_transformer.from_wkt("POINT (30 10)") @@ -195,8 +195,8 @@ def test_from_wkt_bad_points(simplify_transformer): def test_from_geo_json_bad_points(simplify_transformer): with pytest.raises( - Exception, - match=r"WKT: 'POINT \(30 10\)' is not a Polygon or MultiPolygon", + Exception, + match=r"'POINT \(30 10\)' is not a Polygon or MultiPolygon", ): simplify_transformer.from_geo_json({ "type": "Point",