  
              self.assertAlmostEqual(mp.centroid[0], mpnt.centroid.tuple[0], 9)
              self.assertAlmostEqual(mp.centroid[1], mpnt.centroid.tuple[1], 9)
  
              self.assertRaises(IndexError, mpnt.__getitem__, len(mpnt))
              self.assertEqual(mp.centroid, mpnt.centroid.tuple)
              self.assertEqual(mp.coords, tuple(m.tuple for m in mpnt))
              for p in mpnt:
                  self.assertEqual(p.geom_type, 'Point')
                  self.assertEqual(p.geom_typeid, 0)
 
</s> remove                 self.assertRaises(IndexError, mpoly.__getitem__, len(mpoly))
 </s> add                 with self.assertRaises(IndexError):
                    mpoly.__getitem__(len(mpoly)) </s> remove         self.assertRaises(IndexError, p._checkindex, 2)
        self.assertRaises(IndexError, p._checkindex, -3)
 </s> add         with self.assertRaises(IndexError):
            p._checkindex(2)
        with self.assertRaises(IndexError):
            p._checkindex(-3) </s> remove                 self.assertRaises(IndexError, g.__getitem__, 0)
 </s> add                 with self.assertRaises(IndexError):
                    g.__getitem__(0) </s> remove                 self.assertRaises(IndexError, lr.__getitem__, 0)
 </s> add                 with self.assertRaises(IndexError):
                    lr.__getitem__(0) </s> remove             self.assertRaises(IndexError, ml.__getitem__, len(ml))
 </s> add             with self.assertRaises(IndexError):
                ml.__getitem__(len(ml))
            with self.assertRaises(IndexError):
                mpnt.__getitem__(len(mpnt))
  
              self.assertAlmostEqual(mp.centroid[0], mpnt.centroid.tuple[0], 9)
              self.assertAlmostEqual(mp.centroid[1], mpnt.centroid.tuple[1], 9)
  
            with self.assertRaises(IndexError):
                mpnt.__getitem__(len(mpnt))
              self.assertEqual(mp.centroid, mpnt.centroid.tuple)
              self.assertEqual(mp.coords, tuple(m.tuple for m in mpnt))
              for p in mpnt:
                  self.assertEqual(p.geom_type, 'Point')
                  self.assertEqual(p.geom_typeid, 0)
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/gis_tests/geos_tests/test_geos.py