1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Improved consistency of GEOS error messages.

This commit is contained in:
David Smith
2024-11-08 08:00:05 +00:00
committed by nessita
parent 414253866b
commit 14fc2e9703
5 changed files with 11 additions and 9 deletions

View File

@@ -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]