          'Testing Geometry IndexError'
          p = Point(1, 2)
          for i in range(-2, 2):
              p._checkindex(i)
          self.assertRaises(IndexError, p._checkindex, 2)
          self.assertRaises(IndexError, p._checkindex, -3)
  
      def test01_PointMutations(self):
          'Testing Point mutations'
          for p in (Point(1, 2, 3), fromstr('POINT (1 2 3)')):
              self.assertEqual(p._get_single_external(1), 2.0, 'Point _get_single_external')
 
</s> remove         self.assertRaises(TypeError, Point, range(1))
        self.assertRaises(TypeError, Point, range(4))
 </s> add         with self.assertRaises(TypeError):
            Point(range(1))
        with self.assertRaises(TypeError):
            Point(range(4)) </s> remove         self.assertRaises(TypeError, setfcn, ul, slice(0, 3, 2), 2)
 </s> add         with self.assertRaises(TypeError):
            setfcn(ul, slice(0, 3, 2), 2) </s> remove             self.assertRaises(IndexError, mpnt.__getitem__, len(mpnt))
 </s> add             with self.assertRaises(IndexError):
                mpnt.__getitem__(len(mpnt)) </s> remove                 self.assertRaises(IndexError, mpoly.__getitem__, len(mpoly))
 </s> add                 with self.assertRaises(IndexError):
                    mpoly.__getitem__(len(mpoly)) </s> remove             self.assertRaises(IndexError, poly.__getitem__, len(poly))
            self.assertRaises(IndexError, poly.__setitem__, len(poly), False)
            self.assertRaises(IndexError, poly.__getitem__, -1 * len(poly) - 1)
 </s> add             with self.assertRaises(IndexError):
                poly.__getitem__(len(poly))
            with self.assertRaises(IndexError):
                poly.__setitem__(len(poly), False)
            with self.assertRaises(IndexError):
                poly.__getitem__(-1 * len(poly) - 1)
        with self.assertRaises(IndexError):
            p._checkindex(2)
        with self.assertRaises(IndexError):
            p._checkindex(-3)
          'Testing Geometry IndexError'
          p = Point(1, 2)
          for i in range(-2, 2):
              p._checkindex(i)
        with self.assertRaises(IndexError):
            p._checkindex(2)
        with self.assertRaises(IndexError):
            p._checkindex(-3)
        with self.assertRaises(IndexError):
            p._checkindex(2)
        with self.assertRaises(IndexError):
            p._checkindex(-3)
  
      def test01_PointMutations(self):
          'Testing Point mutations'
          for p in (Point(1, 2, 3), fromstr('POINT (1 2 3)')):
              self.assertEqual(p._get_single_external(1), 2.0, 'Point _get_single_external')
keep keep keep keep replace replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/gis_tests/geos_tests/test_geos_mutation.py