'Testing IsValidReason support'

@skipUnless((HAS_GEOS and GEOS_PREPARE), u'geos    >=    3.1.0    is    required')
def test_valid_reason(self):

    g = GEOSGeometry(u'POINT(0    0)')
    self.assertTrue(g.valid)
    self.assertIsInstance(g.valid_reason, six.string_types)
    self.assertEqual(g.valid_reason, u'Valid    Geometry')
    g = GEOSGeometry(u'LINESTRING(0    0,    0    0)')
    self.assertFalse(g.valid)
    self.assertIsInstance(g.valid_reason, six.string_types)
    self.assertTrue(g.valid_reason.startswith(u'Too    few    points    in    geometry    component'))
