Skip to content

Commit cfda386

Browse files
committed
Use "string" instead of pyarrow.string() in case pyarrow not installed
Fixes `AttributeError: 'NoneType' object has no attribute 'string'`
1 parent d379e46 commit cfda386

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pygmt/tests/test_clib_put_strings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
pytest.param(np.array, {"dtype": str}, id="str"),
2424
pytest.param(
2525
getattr(pa, "array", None),
26-
{"type": pa.string()},
26+
{"type": "string"}, # pa.string()
2727
marks=skip_if_no(package="pyarrow"),
2828
id="pyarrow",
2929
),

pygmt/tests/test_clib_virtualfiles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def test_virtualfile_from_vectors(dtypes):
238238
pytest.param(np.array, {"dtype": object}, id="object"),
239239
pytest.param(
240240
getattr(pa, "array", None),
241-
{"type": pa.string()},
241+
{"type": "string"}, # pa.string()
242242
marks=skip_if_no(package="pyarrow"),
243243
id="pyarrow",
244244
),

0 commit comments

Comments
 (0)