Skip to content

clib.conversion._to_numpy: Use pytest.mark.skipif to skip string_view type test for pyarrow < 16 #3660

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 3 commits into from
Dec 1, 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
10 changes: 9 additions & 1 deletion pygmt/tests/test_clib_to_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class pa: # noqa: N801
A dummy class to mimic pyarrow.
"""

__version__ = "0.0.0"

@staticmethod
def timestamp(unit: str, tz: str | None = None):
"""
Expand Down Expand Up @@ -336,7 +338,13 @@ def test_to_numpy_pyarrow_numeric_with_na(dtype, expected_dtype):
"utf8", # alias for string
"large_string",
"large_utf8", # alias for large_string
"string_view",
pytest.param(
"string_view",
marks=pytest.mark.skipif(
Version(pa.__version__) < Version("16"),
reason="string_view type was added since pyarrow 16",
),
),
],
)
def test_to_numpy_pyarrow_string(dtype):
Expand Down