Skip to content

Commit

Permalink
Simplify to remove getattr(pa, "array", None) call
Browse files Browse the repository at this point in the history
Co-Authored-By: Dongdong Tian <[email protected]>
  • Loading branch information
weiji14 and seisman committed Nov 15, 2024
1 parent edb3438 commit 85d2bb5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pygmt/tests/test_clib_virtualfile_from_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@

try:
import pyarrow as pa

pa_array = pa.array
except ImportError:
pa = None
pa_array = None


@pytest.fixture(scope="module", name="dtypes")
Expand Down Expand Up @@ -65,8 +67,8 @@ def test_virtualfile_from_vectors(dtypes):
pytest.param(np.array, {"dtype": np.str_}, id="str"),
pytest.param(np.array, {"dtype": np.object_}, id="object"),
pytest.param(
getattr(pa, "array", None),
{}, # pa.string()
pa_array,
{}, # {"type": pa.string()}
marks=skip_if_no(package="pyarrow"),
id="pyarrow",
),
Expand Down

0 comments on commit 85d2bb5

Please sign in to comment.