def test01d_errors(self):
        "Testing the Error handlers."
        # string-based
        print "\nBEGIN - expecting GEOS_ERROR; safe to ignore.\n"
        for err in errors:
            try:
                g = fromstr(err.wkt)
            except (GEOSException, __HOLE__):
                pass
        print "\nEND - expecting GEOS_ERROR; safe to ignore.\n"
        
        class NotAGeometry(object):
            pass
        
        # Some other object
        self.assertRaises(TypeError, GEOSGeometry, NotAGeometry())
        # None
        self.assertRaises(TypeError, GEOSGeometry, None)
        # Bad WKB
        self.assertRaises(GEOSException, GEOSGeometry, buffer('0'))
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/contrib/gis/tests/test_geos.py/GEOSTest.test01d_errors