Fixed GEOSTest.test_emptyCollections() on GEOS 3.8.0.

It's a regression in GEOS 3.8.0 fixed in GEOS 3.8.1.
This commit is contained in:
Mariusz Felisiak 2022-07-01 19:05:27 +02:00 committed by GitHub
parent 03eec9ff6c
commit 863aa7541d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

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