          self.assertEqual(GEOSGeometry('POINT(5 23)'), pnt_fld.clean('POINT(5 23)'))
          # a WKT for any other geom_type will be properly transformed by `to_python`
          self.assertEqual(GEOSGeometry('LINESTRING(0 0, 1 1)'), pnt_fld.to_python('LINESTRING(0 0, 1 1)'))
          # but rejected by `clean`
          self.assertRaises(forms.ValidationError, pnt_fld.clean, 'LINESTRING(0 0, 1 1)')
  
      def test_to_python(self):
          """
          Testing to_python returns a correct GEOSGeometry object or
          a ValidationError
 
</s> remove             self.assertRaises(forms.ValidationError, fld.to_python, wkt)
 </s> add             with self.assertRaises(forms.ValidationError):
                fld.to_python(wkt) </s> remove         self.assertRaises(ImproperlyConfigured, self.client.get, '/list/authors/invalid/')
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.client.get('/list/authors/invalid/') </s> remove         self.assertRaises(InvalidPage, paginator.page, 3)
        self.assertRaises(PageNotAnInteger, paginator.validate_number, None)
        self.assertRaises(PageNotAnInteger, paginator.validate_number, 'x')
 </s> add         with self.assertRaises(InvalidPage):
            paginator.page(3)
        with self.assertRaises(PageNotAnInteger):
            paginator.validate_number(None)
        with self.assertRaises(PageNotAnInteger):
            paginator.validate_number('x') </s> remove             self.assertRaises(TypeError, poly.__setitem__, 0, LineString((1, 1), (2, 2)))
 </s> add             with self.assertRaises(TypeError):
                poly.__setitem__(0, LineString((1, 1), (2, 2))) </s> remove         self.assertRaises(TypeError, ls.__setitem__, 0, (1., 2.))
 </s> add         with self.assertRaises(TypeError):
            ls.__setitem__(0, (1., 2.))
        with self.assertRaises(forms.ValidationError):
            pnt_fld.clean('LINESTRING(0 0, 1 1)')
          self.assertEqual(GEOSGeometry('POINT(5 23)'), pnt_fld.clean('POINT(5 23)'))
          # a WKT for any other geom_type will be properly transformed by `to_python`
          self.assertEqual(GEOSGeometry('LINESTRING(0 0, 1 1)'), pnt_fld.to_python('LINESTRING(0 0, 1 1)'))
          # but rejected by `clean`
        with self.assertRaises(forms.ValidationError):
            pnt_fld.clean('LINESTRING(0 0, 1 1)')
  
      def test_to_python(self):
          """
          Testing to_python returns a correct GEOSGeometry object or
          a ValidationError
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/gis_tests/test_geoforms.py