diff options
| author | David Smith <smithdc@gmail.com> | 2024-11-08 08:00:05 +0000 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-07-21 22:23:29 -0300 |
| commit | 14fc2e97036fc9d7acb55ada4f16f1aa3bdc5ec7 (patch) | |
| tree | 1809dbc526129f7ecb5dd27df490042421cfe521 /tests/gis_tests | |
| parent | 414253866b3671c6f5600a9c39b5709effe16cce (diff) | |
Improved consistency of GEOS error messages.
Diffstat (limited to 'tests/gis_tests')
| -rw-r--r-- | tests/gis_tests/geos_tests/test_coordseq.py | 2 | ||||
| -rw-r--r-- | tests/gis_tests/geos_tests/test_geos.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/gis_tests/geos_tests/test_coordseq.py b/tests/gis_tests/geos_tests/test_coordseq.py index 507a22d1a0..b6f5136dd1 100644 --- a/tests/gis_tests/geos_tests/test_coordseq.py +++ b/tests/gis_tests/geos_tests/test_coordseq.py @@ -9,7 +9,7 @@ class GEOSCoordSeqTest(SimpleTestCase): with self.subTest(i): self.assertEqual(coord_seq[i], (i, i)) for i in (-3, 10): - msg = "invalid GEOS Geometry index: %s" % i + msg = f"Invalid GEOS Geometry index: {i}" with self.subTest(i): with self.assertRaisesMessage(IndexError, msg): coord_seq[i] diff --git a/tests/gis_tests/geos_tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py index 86ea2227fb..ac67d6ccad 100644 --- a/tests/gis_tests/geos_tests/test_geos.py +++ b/tests/gis_tests/geos_tests/test_geos.py @@ -679,7 +679,7 @@ class GEOSTest(SimpleTestCase, TestDataMixin): # Testing polygon construction. msg = ( "Parameter must be a sequence of LinearRings or " - "objects that can initialize to LinearRings" + "objects that can initialize to LinearRings." ) with self.assertRaisesMessage(TypeError, msg): Polygon(0, [1, 2, 3]) @@ -804,7 +804,7 @@ class GEOSTest(SimpleTestCase, TestDataMixin): def test_relate_pattern(self): "Testing relate() and relate_pattern()." g = fromstr("POINT (0 0)") - msg = "invalid intersection matrix pattern" + msg = "Invalid intersection matrix pattern." with self.assertRaisesMessage(GEOSException, msg): g.relate_pattern(0, "invalid pattern, yo") for rg in self.geometries.relate_geoms: @@ -1289,7 +1289,7 @@ class GEOSTest(SimpleTestCase, TestDataMixin): if isinstance(g, Point): # IndexError is not raised in GEOS 3.8.0. if geos_version_tuple() != (3, 8, 0): - msg = "invalid GEOS Geometry index:" + msg = "Invalid GEOS Geometry index:" with self.assertRaisesMessage(IndexError, msg): g.x elif isinstance(g, Polygon): |
