From 8a90c895822f6e2bd0b9a088a7d6b6aac043a1c9 Mon Sep 17 00:00:00 2001 From: Patrick Hoefler Date: Mon, 12 Dec 2022 20:15:46 +0100 Subject: [PATCH] CLN: Remove unsupported skips of pyarrow versions --- pandas/tests/extension/base/casting.py | 4 +--- pandas/tests/frame/methods/test_astype.py | 2 +- pandas/tests/io/test_common.py | 2 +- pandas/tests/io/test_fsspec.py | 2 +- pandas/tests/io/test_parquet.py | 6 +++--- pandas/tests/series/methods/test_astype.py | 2 +- pandas/tests/series/methods/test_update.py | 2 +- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pandas/tests/extension/base/casting.py b/pandas/tests/extension/base/casting.py index 0eb8123e6bdb8..6e1795b150b27 100644 --- a/pandas/tests/extension/base/casting.py +++ b/pandas/tests/extension/base/casting.py @@ -51,9 +51,7 @@ def test_astype_str(self, data): "nullable_string_dtype", [ "string[python]", - pytest.param( - "string[pyarrow]", marks=td.skip_if_no("pyarrow", min_version="1.0.0") - ), + pytest.param("string[pyarrow]", marks=td.skip_if_no("pyarrow")), ], ) def test_astype_string(self, data, nullable_string_dtype): diff --git a/pandas/tests/frame/methods/test_astype.py b/pandas/tests/frame/methods/test_astype.py index 4c74f4782578e..2d3d576154740 100644 --- a/pandas/tests/frame/methods/test_astype.py +++ b/pandas/tests/frame/methods/test_astype.py @@ -697,7 +697,7 @@ def test_astype_empty_dtype_dict(self): pytest.param( ["x", "y", "z"], "string[pyarrow]", - marks=td.skip_if_no("pyarrow", min_version="1.0.0"), + marks=td.skip_if_no("pyarrow"), ), (["x", "y", "z"], "category"), (3 * [Timestamp("2020-01-01", tz="UTC")], None), diff --git a/pandas/tests/io/test_common.py b/pandas/tests/io/test_common.py index 1945012f93b42..f74d268690a5b 100644 --- a/pandas/tests/io/test_common.py +++ b/pandas/tests/io/test_common.py @@ -148,7 +148,7 @@ def test_bytesiowrapper_returns_correct_bytes(self): assert result == data.encode("utf-8") # Test that pyarrow can handle a file opened with get_handle - @td.skip_if_no("pyarrow", min_version="0.15.0") + @td.skip_if_no("pyarrow") def test_get_handle_pyarrow_compat(self): from pyarrow import csv diff --git a/pandas/tests/io/test_fsspec.py b/pandas/tests/io/test_fsspec.py index a1c597087788c..14a7d77773f29 100644 --- a/pandas/tests/io/test_fsspec.py +++ b/pandas/tests/io/test_fsspec.py @@ -150,7 +150,7 @@ def test_to_parquet_new_file(cleared_fs, df1): ) -@td.skip_if_no("pyarrow", min_version="2") +@td.skip_if_no("pyarrow") def test_arrowparquet_options(fsspectest): """Regression test for writing to a not-yet-existent GCS Parquet file.""" df = DataFrame({"a": [0]}) diff --git a/pandas/tests/io/test_parquet.py b/pandas/tests/io/test_parquet.py index ed72b5e251114..8694abc498fe5 100644 --- a/pandas/tests/io/test_parquet.py +++ b/pandas/tests/io/test_parquet.py @@ -926,14 +926,14 @@ def test_additional_extension_arrays(self, pa): df = pd.DataFrame({"a": pd.Series([1, 2, 3, None], dtype="Int64")}) check_round_trip(df, pa) - @td.skip_if_no("pyarrow", min_version="1.0.0") + @td.skip_if_no("pyarrow") def test_pyarrow_backed_string_array(self, pa, string_storage): # test ArrowStringArray supported through the __arrow_array__ protocol df = pd.DataFrame({"a": pd.Series(["a", None, "c"], dtype="string[pyarrow]")}) with pd.option_context("string_storage", string_storage): check_round_trip(df, pa, expected=df.astype(f"string[{string_storage}]")) - @td.skip_if_no("pyarrow", min_version="2.0.0") + @td.skip_if_no("pyarrow") def test_additional_extension_types(self, pa): # test additional ExtensionArrays that are supported through the # __arrow_array__ protocol + by defining a custom ExtensionType @@ -985,7 +985,7 @@ def test_timezone_aware_index(self, request, pa, timezone_aware_date_list): # this use-case sets the resolution to 1 minute check_round_trip(df, pa, check_dtype=False) - @td.skip_if_no("pyarrow", min_version="1.0.0") + @td.skip_if_no("pyarrow") def test_filter_row_groups(self, pa): # https://github.com/pandas-dev/pandas/issues/26551 df = pd.DataFrame({"a": list(range(0, 3))}) diff --git a/pandas/tests/series/methods/test_astype.py b/pandas/tests/series/methods/test_astype.py index 768cc50857e50..9cc49199166b8 100644 --- a/pandas/tests/series/methods/test_astype.py +++ b/pandas/tests/series/methods/test_astype.py @@ -281,7 +281,7 @@ def test_td64_series_astype_object(self): pytest.param( ["x", "y", "z"], "string[pyarrow]", - marks=td.skip_if_no("pyarrow", min_version="1.0.0"), + marks=td.skip_if_no("pyarrow"), ), (["x", "y", "z"], "category"), (3 * [Timestamp("2020-01-01", tz="UTC")], None), diff --git a/pandas/tests/series/methods/test_update.py b/pandas/tests/series/methods/test_update.py index 6403fcf76122a..3e347604f7351 100644 --- a/pandas/tests/series/methods/test_update.py +++ b/pandas/tests/series/methods/test_update.py @@ -96,7 +96,7 @@ def test_update_from_non_series(self, series, other, expected): [None, "b"], ["a", "b"], "string[pyarrow]", - marks=td.skip_if_no("pyarrow", min_version="1.0.0"), + marks=td.skip_if_no("pyarrow"), ), ([1, None], [None, 2], [1, 2], "Int64"), ([True, None], [None, False], [True, False], "boolean"),