diff --git a/pygmt/tests/test_clib_vectors_to_arrays.py b/pygmt/tests/test_clib_vectors_to_arrays.py index 53d8f8e0c0f..8c746f68bce 100644 --- a/pygmt/tests/test_clib_vectors_to_arrays.py +++ b/pygmt/tests/test_clib_vectors_to_arrays.py @@ -11,11 +11,8 @@ import pytest from pygmt.clib.conversion import vectors_to_arrays -try: - importlib.util.find_spec("pyarrow") - _HAS_PYARROW = True -except ImportError: - _HAS_PYARROW = False +pa = importlib.util.find_spec("pyarrow") +_HAS_PYARROW = not pa def _check_arrays(arrays):