'Testing MultiLineString objects.'

def test03b_multilinestring(self):

    prev = fromstr('POINT(0    0)')
    for l in self.geometries.multilinestrings:
        ml = fromstr(l.wkt)
        self.assertEqual(ml.geom_type, 'MultiLineString')
        self.assertEqual(ml.geom_typeid, 5)
        self.assertAlmostEqual(l.centroid[0], ml.centroid.x, 9)
        self.assertAlmostEqual(l.centroid[1], ml.centroid.y, 9)
        self.assertEqual(True, (ml == fromstr(l.wkt)))
        self.assertEqual(False, (ml == prev))
        prev = ml
        for ls in ml:
            self.assertEqual(ls.geom_type, 'LineString')
            self.assertEqual(ls.geom_typeid, 1)
            self.assertEqual(ls.empty, False)
        self.assertRaises(GEOSIndexError, ml.__getitem__, len(ml))
        self.assertEqual(ml.wkt, MultiLineString(*tuple((s.clone() for s in ml))).wkt)
        self.assertEqual(ml, MultiLineString(*tuple((LineString(s.tuple) for s in ml))))
