Testing MultiLineString objects.
(self)
| 182 | self.assertEqual(y, linestr.y) |
| 183 | |
| 184 | def test_multilinestring(self): |
| 185 | "Testing MultiLineString objects." |
| 186 | prev = OGRGeometry("POINT(0 0)") |
| 187 | for mls in self.geometries.multilinestrings: |
| 188 | mlinestr = OGRGeometry(mls.wkt) |
| 189 | self.assertEqual(5, mlinestr.geom_type) |
| 190 | self.assertEqual("MULTILINESTRING", mlinestr.geom_name) |
| 191 | self.assertEqual(mls.n_p, mlinestr.point_count) |
| 192 | self.assertEqual(mls.coords, mlinestr.tuple) |
| 193 | self.assertEqual(mlinestr, OGRGeometry(mls.wkt)) |
| 194 | self.assertNotEqual(mlinestr, prev) |
| 195 | prev = mlinestr |
| 196 | for ls in mlinestr: |
| 197 | self.assertEqual(2, ls.geom_type) |
| 198 | self.assertEqual("LINESTRING", ls.geom_name) |
| 199 | msg = "Index out of range when accessing geometry in a collection: %s." |
| 200 | with self.assertRaisesMessage(IndexError, msg % len(mlinestr)): |
| 201 | mlinestr.__getitem__(len(mlinestr)) |
| 202 | |
| 203 | def test_linearring(self): |
| 204 | "Testing LinearRing objects." |
nothing calls this directly
no test coverage detected