1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

[3.2.x] Fixed GEOSTest.test_emptyCollections() on GEOS 3.8.0.

It's a regression in GEOS 3.8.0 fixed in GEOS 3.8.1.
Backport of 863aa7541d30247e7eb7a973ff68a7d36f16dc02 from main
This commit is contained in:
Mariusz Felisiak 2022-07-01 19:05:27 +02:00
parent 4a5d98ee0a
commit 3acf156be3

View File

@ -1051,8 +1051,10 @@ class GEOSTest(SimpleTestCase, TestDataMixin):
# Testing __getitem__ (doesn't work on Point or Polygon) # Testing __getitem__ (doesn't work on Point or Polygon)
if isinstance(g, Point): if isinstance(g, Point):
with self.assertRaises(IndexError): # IndexError is not raised in GEOS 3.8.0.
g.x if geos_version_tuple() != (3, 8, 0):
with self.assertRaises(IndexError):
g.x
elif isinstance(g, Polygon): elif isinstance(g, Polygon):
lr = g.shell lr = g.shell
self.assertEqual('LINEARRING EMPTY', lr.wkt) self.assertEqual('LINEARRING EMPTY', lr.wkt)