'Testing Coordinate Sequence objects.'

def test_coord_seq(self):

    for p in self.geometries.polygons:
        if p.ext_ring_cs:
            poly = fromstr(p.wkt)
            cs = poly.exterior_ring.coord_seq
            self.assertEqual(p.ext_ring_cs, cs.tuple)
            self.assertEqual(len(p.ext_ring_cs), len(cs))
            for i in xrange(len(p.ext_ring_cs)):
                c1 = p.ext_ring_cs[i]
                c2 = cs[i]
                self.assertEqual(c1, c2)
                if (len(c1) == 2):
                    tset = (5, 23)
                else:
                    tset = (5, 23, 8)
                cs[i] = tset
                for j in range(len(tset)):
                    cs[i] = tset
                    self.assertEqual(tset[j], cs[i][j])
