'Testing LinearRing objects.'

def test04_linearring(self):

    for rr in self.geometries.linearrings:
        lr = fromstr(rr.wkt)
        self.assertEqual(lr.geom_type, 'LinearRing')
        self.assertEqual(lr.geom_typeid, 2)
        self.assertEqual(rr.n_p, len(lr))
        self.assertEqual(True, lr.valid)
        self.assertEqual(False, lr.empty)
        self.assertEqual(lr, LinearRing(lr.tuple))
        self.assertEqual(lr, LinearRing(*lr.tuple))
        self.assertEqual(lr, LinearRing([list(tup) for tup in lr.tuple]))
        if numpy:
            self.assertEqual(lr, LinearRing(numpy.array(lr.tuple)))
