

def test_multipoint(self):
    geom = MultiPoint(((1.0, 2.0), (3.0, 4.0)))
    self.assertEqual(len(geom.geoms), 2)
    self.assertEqual(dump_coords(geom), [[(1.0, 2.0)], [(3.0, 4.0)]])
    geom = MultiPoint((Point(1.0, 2.0), Point(3.0, 4.0)))
    self.assertEqual(len(geom.geoms), 2)
    self.assertEqual(dump_coords(geom), [[(1.0, 2.0)], [(3.0, 4.0)]])
    geom2 = MultiPoint(geom)
    self.assertEqual(len(geom2.geoms), 2)
    coords.assertEqual(dump_coords(geom2), [[(1.0, 2.0)], [(3.0, 4.0)]])
    self.assertIsInstance(geom.geoms[0], Point)
    self.assertEqual(geom.geoms[0].x, 1.0)
    self.assertEqual(geom.geoms[0].y, 2.0)
    with self.assertRaises(IndexError):
        geom.geoms[2]
    self.assertEqual(geom.__geo_interface__, {
        'type': 'MultiPoint',
        'coordinates': ((1.0, 2.0), (3.0, 4.0)),
    })
    coords = [[5.0, 6.0], [7.0, 8.0]]
    geoma = asMultiPoint(coords)
    self.assertEqual(dump_coords(geoma), [[(5.0, 6.0)], [(7.0, 8.0)]])

dataset/ETHPy150Open Toblerity/Shapely/tests/test_multipoint.py MultiPointTestCase.test_multipoint/VarMisuse@155/173 `self`->`coords`