Skip to content

Commit

Permalink
update pq tests to cover zstd
Browse files Browse the repository at this point in the history
  • Loading branch information
vuule committed May 13, 2022
1 parent 34f0409 commit e04ac19
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions python/cudf/cudf/tests/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ def gdf_day_timestamps(pdf_day_timestamps):
return cudf.DataFrame.from_pandas(pdf_day_timestamps)


@pytest.fixture(params=["snappy", "gzip", "brotli", None, np.str_("snappy")])
@pytest.fixture(
params=["snappy", "gzip", "brotli", "zstd", None, np.str_("snappy")]
)
def parquet_file(request, tmp_path_factory, pdf):
fname = tmp_path_factory.mktemp("parquet") / (
str(request.param) + "_test.parquet"
Expand Down Expand Up @@ -2509,8 +2511,10 @@ def test_parquet_reader_decimal_columns():
assert_eq(actual, expected)


def test_parquet_reader_unsupported_compression(datadir):
def test_parquet_reader_zstd_compression(datadir):
fname = datadir / "spark_zstd.parquet"

with pytest.raises(RuntimeError):
cudf.read_parquet(fname)
actual = cudf.read_parquet(fname)
expected = pd.read_parquet(fname)

assert_eq(actual, expected)

0 comments on commit e04ac19

Please sign in to comment.