Skip to content

Commit 63dc1bb

Browse files
authored
CI: xfail test_to_read_gcs for pyarrow=17 (#59306)
1 parent 1500b52 commit 63dc1bb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pandas/tests/io/test_gcs.py

Lines changed: 10 additions & 1 deletion
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
@@ -96,6 +98,13 @@ def from_uri(path):
9698
to_local = pathlib.Path(path.replace("gs://", "")).absolute().as_uri()
9799
return pa_fs.LocalFileSystem(to_local)
98100

101+
request.applymarker(
102+
pytest.mark.xfail(
103+
not pa_version_under17p0,
104+
raises=TypeError,
105+
reason="pyarrow 17 broke the mocked filesystem",
106+
)
107+
)
99108
with monkeypatch.context() as m:
100109
m.setattr(pa_fs, "FileSystem", MockFileSystem)
101110
df1.to_parquet(path)

0 commit comments

Comments
 (0)