Skip to content

CI: xfail test_to_read_gcs for pyarrow=17 #59306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pandas/tests/io/test_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import numpy as np
import pytest

from pandas.compat.pyarrow import pa_version_under17p0

from pandas import (
DataFrame,
Index,
Expand Down Expand Up @@ -52,7 +54,7 @@ def ls(self, path, **kwargs):
# Patches pyarrow; other processes should not pick up change
@pytest.mark.single_cpu
@pytest.mark.parametrize("format", ["csv", "json", "parquet", "excel", "markdown"])
def test_to_read_gcs(gcs_buffer, format, monkeypatch, capsys):
def test_to_read_gcs(gcs_buffer, format, monkeypatch, capsys, request):
"""
Test that many to/read functions support GCS.

Expand Down Expand Up @@ -96,6 +98,13 @@ def from_uri(path):
to_local = pathlib.Path(path.replace("gs://", "")).absolute().as_uri()
return pa_fs.LocalFileSystem(to_local)

request.applymarker(
pytest.mark.xfail(
not pa_version_under17p0,
raises=TypeError,
reason="pyarrow 17 broke the mocked filesystem",
)
)
with monkeypatch.context() as m:
m.setattr(pa_fs, "FileSystem", MockFileSystem)
df1.to_parquet(path)
Expand Down