          class NotAGeometry(object):
              pass
  
          # Some other object
          self.assertRaises(TypeError, GEOSGeometry, NotAGeometry())
          # None
          self.assertRaises(TypeError, GEOSGeometry, None)
  
      def test_wkb(self):
          "Testing WKB output."
 
</s> remove         self.assertRaises(TypeError, GEOSGeometry, None)
 </s> add         with self.assertRaises(TypeError):
            GEOSGeometry(None) </s> remove         self.assertRaises(GEOSException, GEOSGeometry, six.memoryview(b'0'))
 </s> add         with self.assertRaises(GEOSException):
            GEOSGeometry(six.memoryview(b'0')) </s> remove             self.assertRaises(TypeError, fg1._set_ptr, bad_ptr)
            self.assertRaises(TypeError, fg2._set_ptr, bad_ptr)
 </s> add             with self.assertRaises(TypeError):
                fg1._set_ptr(bad_ptr)
            with self.assertRaises(TypeError):
                fg2._set_ptr(bad_ptr) </s> remove         self.assertRaises(ValueError, setattr, p, 'restaurant', None)
 </s> add         with self.assertRaises(ValueError):
            setattr(p, 'restaurant', None) </s> remove         self.assertRaises(ImproperlyConfigured, get_user, request)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            get_user(request)
        with self.assertRaises(TypeError):
            GEOSGeometry(NotAGeometry())
          class NotAGeometry(object):
              pass
  
          # Some other object
        with self.assertRaises(TypeError):
            GEOSGeometry(NotAGeometry())
          # None
          self.assertRaises(TypeError, GEOSGeometry, None)
  
      def test_wkb(self):
          "Testing WKB output."
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