'Testing IsValidReason support'

def test27_valid_reason(self):

    if (not GEOS_PREPARE):
        return
    g = GEOSGeometry('POINT(0    0)')
    self.assertTrue(g.valid)
    self.assertTrue(isinstance(g.valid_reason, basestring))
    self.assertEqual(g.valid_reason, 'Valid    Geometry')
    print '\nBEGIN    -    expecting    GEOS_NOTICE;    safe    to    ignore.\n'
    g = GEOSGeometry('LINESTRING(0    0,    0    0)')
    self.assertTrue((not g.valid))
    self.assertTrue(isinstance(g.valid_reason, basestring))
    self.assertTrue(g.valid_reason.startswith('Too    few    points    in    geometry    component'))
    print '\nEND    -    expecting    GEOS_NOTICE;    safe    to    ignore.\n'
