Skip to content

Commit f656d52

Browse files
Backport PR pandas-dev#59306 on branch 2.2.x (CI: xfail test_to_read_gcs for pyarrow=17) (pandas-dev#59308)
Backport PR pandas-dev#59306: CI: xfail test_to_read_gcs for pyarrow=17 Co-authored-by: Matthew Roeschke <[email protected]>
1 parent 98ba07a commit f656d52

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pandas/tests/io/test_gcs.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import numpy as np
88
import pytest
99

10+
from pandas.compat.pyarrow import pa_version_under17p0
11+
1012
from pandas import (
1113
DataFrame,
1214
Index,
@@ -52,7 +54,7 @@ def ls(self, path, **kwargs):
5254
# Patches pyarrow; other processes should not pick up change
5355
@pytest.mark.single_cpu
5456
@pytest.mark.parametrize("format", ["csv", "json", "parquet", "excel", "markdown"])
55-
def test_to_read_gcs(gcs_buffer, format, monkeypatch, capsys):
57+
def test_to_read_gcs(gcs_buffer, format, monkeypatch, capsys, request):
5658
"""
5759
Test that many to/read functions support GCS.
5860
@@ -91,6 +93,13 @@ def from_uri(path):
9193
to_local = pathlib.Path(path.replace("gs://", "")).absolute().as_uri()
9294
return pa_fs.LocalFileSystem(to_local)
9395

96+
request.applymarker(
97+
pytest.mark.xfail(
98+
not pa_version_under17p0,
99+
raises=TypeError,
100+
reason="pyarrow 17 broke the mocked filesystem",
101+
)
102+
)
94103
with monkeypatch.context() as m:
95104
m.setattr(pa_fs, "FileSystem", MockFileSystem)
96105
df1.to_parquet(path)

0 commit comments

Comments
 (0)