From 5d7ef9512e49b654d4354a4ad5cb36d0c782924c Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Tue, 14 Oct 2025 08:52:45 -0700 Subject: [PATCH] TST: Remove leftover file in test_compression --- pandas/tests/io/test_parquet.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pandas/tests/io/test_parquet.py b/pandas/tests/io/test_parquet.py index 53f5a79625ee3..2927b24624026 100644 --- a/pandas/tests/io/test_parquet.py +++ b/pandas/tests/io/test_parquet.py @@ -198,6 +198,8 @@ def check_round_trip( repeat: int, optional How many times to repeat the test """ + if not isinstance(temp_file, pathlib.Path): + raise ValueError("temp_file must be a pathlib.Path") write_kwargs = write_kwargs or {"compression": None} read_kwargs = read_kwargs or {} @@ -396,9 +398,11 @@ def test_columns_dtypes(self, engine, temp_file): check_round_trip(df, temp_file, engine) @pytest.mark.parametrize("compression", [None, "gzip", "snappy", "brotli"]) - def test_compression(self, engine, compression): + def test_compression(self, engine, compression, temp_file): df = pd.DataFrame({"A": [1, 2, 3]}) - check_round_trip(df, engine, write_kwargs={"compression": compression}) + check_round_trip( + df, temp_file, engine, write_kwargs={"compression": compression} + ) def test_read_columns(self, engine, temp_file): # GH18154 @@ -424,8 +428,8 @@ def test_read_filters(self, engine, tmp_path): expected = pd.DataFrame({"int": [0, 1]}) check_round_trip( df, + tmp_path, engine, - path=tmp_path, expected=expected, write_kwargs={"partition_cols": ["part"]}, read_kwargs={"filters": [("part", "==", "a")], "columns": ["int"]},