      @mock.patch('django.contrib.gis.gdal.HAS_GDAL', False)
      def test_transform_nogdal(self):
          """ Testing `transform` method (GDAL not available) """
          g = GEOSGeometry('POINT (-104.609 38.255)', 4326)
          self.assertRaises(GEOSException, g.transform, 2774)
  
          g = GEOSGeometry('POINT (-104.609 38.255)', 4326)
          self.assertRaises(GEOSException, g.transform, 2774, clone=True)
  
      def test_extent(self):
 
</s> remove         self.assertRaises(GEOSException, g.transform, 2774, clone=True)
 </s> add         with self.assertRaises(GEOSException):
            g.transform(2774, clone=True) </s> remove         self.assertRaises(GEOSException, g.transform, 2774)
 </s> add         with self.assertRaises(GEOSException):
            g.transform(2774) </s> remove         self.assertRaises(GEOSException, g.transform, 2774)
 </s> add         with self.assertRaises(GEOSException):
            g.transform(2774) </s> remove         self.assertRaises(GEOSException, g.transform, 2774, clone=True)
 </s> add         with self.assertRaises(GEOSException):
            g.transform(2774, clone=True) </s> remove         self.assertRaises(GEOSException, g.transform, 2774, clone=True)
 </s> add         with self.assertRaises(GEOSException):
            g.transform(2774, clone=True)
        with self.assertRaises(GEOSException):
            g.transform(2774)
      @mock.patch('django.contrib.gis.gdal.HAS_GDAL', False)
      def test_transform_nogdal(self):
          """ Testing `transform` method (GDAL not available) """
          g = GEOSGeometry('POINT (-104.609 38.255)', 4326)
        with self.assertRaises(GEOSException):
            g.transform(2774)
  
          g = GEOSGeometry('POINT (-104.609 38.255)', 4326)
          self.assertRaises(GEOSException, g.transform, 2774, clone=True)
  
      def test_extent(self):
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