  
          # Some other object
          self.assertRaises(TypeError, GEOSGeometry, NotAGeometry())
          # None
          self.assertRaises(TypeError, GEOSGeometry, None)
  
      def test_wkb(self):
          "Testing WKB output."
          for g in self.geometries.hex_wkt:
              geom = fromstr(g.wkt)
 
</s> remove         self.assertRaises(TypeError, GEOSGeometry, NotAGeometry())
 </s> add         with self.assertRaises(TypeError):
            GEOSGeometry(NotAGeometry()) </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(TypeError, wkt_r.read, 1)
        self.assertRaises(TypeError, wkt_r.read, memoryview(b'foo'))
 </s> add         with self.assertRaises(TypeError):
            wkt_r.read(1)
        with self.assertRaises(TypeError):
            wkt_r.read(memoryview(b'foo')) </s> remove         self.assertRaises(TypeError, cntry_g.country_code, 17)
        self.assertRaises(TypeError, cntry_g.country_name, GeoIP)
 </s> add         with self.assertRaises(TypeError):
            cntry_g.country_code(17)
        with self.assertRaises(TypeError):
            cntry_g.country_name(GeoIP)
        with self.assertRaises(TypeError):
            GEOSGeometry(None)
  
          # Some other object
          self.assertRaises(TypeError, GEOSGeometry, NotAGeometry())
          # None
        with self.assertRaises(TypeError):
            GEOSGeometry(None)
  
      def test_wkb(self):
          "Testing WKB output."
          for g in self.geometries.hex_wkt:
              geom = fromstr(g.wkt)
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