def test_filesystem_protocol(df, tmp_path): # For now, hardcodes "tmp_path" to force the path to be POSIX; non-POSIX paths (from a real tmp_path) not yet supported. p = 5 # Use an in-memory filesystem protocol path = "memory://tmp_path/spatial_points_1.parquet" dsp.to_parquet(df, path, 'x', 'y', p=p, npartitions=2) spf = dsp.read_parquet(path) assert isinstance(spf, dsp.SpatialPointsFrame)
def s_points_frame(request, tmp_path, df): # Work around https://bugs.python.org/issue33617 tmp_path = str(tmp_path) p = 5 path = os.path.join(tmp_path, 'spatial_points.parquet') dsp.to_parquet(df, path, 'x', 'y', p=p, npartitions=10) spf = dsp.read_parquet(path) if request.param: spf = spf.persist() return spf