'Testing GeometryCollection.add().'

def test14_add(self):

    mp = OGRGeometry('MultiPolygon')
    pnt = OGRGeometry('POINT(5    23)')
    self.assertRaises(OGRException, mp.add, pnt)
    for mp in self.geometries.multipolygons:
        mpoly = OGRGeometry(mp.wkt)
        mp1 = OGRGeometry('MultiPolygon')
        mp2 = OGRGeometry('MultiPolygon')
        mp3 = OGRGeometry('MultiPolygon')
        for poly in mpoly:
            mp1.add(poly)
            mp2.add(poly.wkt)
        mp3.add(mpoly)
        for tmp in (mp1, mp2, mp3):
            self.assertEqual(mpoly, tmp)
