              if mp.valid:
                  self.assertEqual(mp.num_geom, mpoly.num_geom)
                  self.assertEqual(mp.n_p, mpoly.num_coords)
                  self.assertEqual(mp.num_geom, len(mpoly))
                  self.assertRaises(GEOSIndexError, mpoly.__getitem__, len(mpoly))
                  for p in mpoly:
                      self.assertEqual(p.geom_type, 'Polygon')
                      self.assertEqual(p.geom_typeid, 3)
                      self.assertEqual(p.valid, True)
                  self.assertEqual(mpoly.wkt, MultiPolygon(*tuple(poly.clone() for poly in mpoly)).wkt)
 
</s> remove             self.assertRaises(GEOSIndexError, mpnt.__getitem__, len(mpnt))
 </s> add             self.assertRaises(IndexError, mpnt.__getitem__, len(mpnt)) </s> remove         self.assertRaises(GEOSIndexError, p._checkindex, 2)
        self.assertRaises(GEOSIndexError, p._checkindex, -3)
 </s> add         self.assertRaises(IndexError, p._checkindex, 2)
        self.assertRaises(IndexError, p._checkindex, -3) </s> remove         'Testing Geometry GEOSIndexError'
 </s> add         'Testing Geometry IndexError' </s> remove         raise self._IndexError('invalid index: %s' % str(index))
 </s> add         raise IndexError('invalid index: %s' % str(index))
                self.assertRaises(IndexError, mpoly.__getitem__, len(mpoly))
              if mp.valid:
                  self.assertEqual(mp.num_geom, mpoly.num_geom)
                  self.assertEqual(mp.n_p, mpoly.num_coords)
                  self.assertEqual(mp.num_geom, len(mpoly))
                self.assertRaises(IndexError, mpoly.__getitem__, len(mpoly))
                  for p in mpoly:
                      self.assertEqual(p.geom_type, 'Polygon')
                      self.assertEqual(p.geom_typeid, 3)
                      self.assertEqual(p.valid, True)
                  self.assertEqual(mpoly.wkt, MultiPolygon(*tuple(poly.clone() for poly in mpoly)).wkt)
keep keep keep keep replace keep keep keep keep keep
 Fixed #25225 -- Simplified code to remove GEOSIndexError

The test is a regression for refs #4740 to show that the original
fix of GEOSIndexError is no longer needed. 
tests/gis_tests/geos_tests/test_geos.py