def test_from_wkt_empty(wkt): geom = shapely.from_wkt(wkt) assert shapely.is_geometry(geom).all() assert shapely.is_empty(geom).all() assert shapely.to_wkt(geom) == wkt
def test_from_wkb_empty(wkt): wkb = shapely.to_wkb(shapely.Geometry(wkt)) geom = shapely.from_wkb(wkb) assert shapely.is_geometry(geom).all() assert shapely.is_empty(geom).all() assert shapely.to_wkb(geom) == wkb
def test_subclass_is_geometry(with_point_in_registry): assert shapely.is_geometry(Point("POINT (1 1)"))