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

        g = GEOSGeometry("POINT(0 0)")
        self.assertTrue(g.valid)
        self.assertIsInstance(g.valid_reason, six.string_types)
        self.assertEqual(g.valid_reason, "Valid Geometry")

        g = GEOSGeometry("LINESTRING(0 0, 0 0)")

        self.assertFalse(g.valid)
        self.assertIsInstance(g.valid_reason, six.string_types)
        self.assertTrue(g.valid_reason.startswith("Too few points in geometry component"))
Set multiple keys with a specified policy.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/contrib/gis/geos/tests/test_geos.py/GEOSTest.test_valid_reason--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/memcache/__init__.py/Client._set_multi_with_policy