From 5e9bb0043b656325cd47dbcb312546c35c31d351 Mon Sep 17 00:00:00 2001 From: gjclark Date: Thu, 29 Aug 2024 09:08:39 -0800 Subject: [PATCH] chore: Change misleading wording --- geo_extensions/transformer.py | 2 +- tests/test_transformer.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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",