def testGeometryCollection(self): gc = { "type": "GeometryCollection", "id": "GC", "geometries": [ self.polygon['geometry'], self.linestring['geometry'], self.point['geometry'], self.multipolygon['geometry'], self.multilinestring['geometry'] ], } a = draw.geometry(gc, id='cats') assert isinstance(a, six.string_types) assert 'id="cats"' in a
def testDrawAndConvertToString(self): draw.geometry(self.linestring['geometry']) draw.geometry(self.multilinestring['geometry']) draw.geometry(self.polygon['geometry']) draw.geometry(self.multipolygon['geometry'])
def testUnkownGeometry(self): with self.assertRaises(errors.SvgisError): draw.geometry({"type": "FooBar", "coordinates": []})
def testDrawInvalidGeometry(self): with self.assertRaises(errors.SvgisError): draw.geometry(self.feature['geometry'])