Skip to content

Commit f6b3619

Browse files
committed
Fix the dtypes_pandas
1 parent 41d8ad5 commit f6b3619

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

pygmt/tests/test_clib_virtualfile_from_vectors.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ def fixture_dtypes_pandas(dtypes):
2626
"""
2727
List of supported pandas dtypes.
2828
"""
29-
dtypes_pandas = dtypes.copy()
30-
3129
if find_spec("pyarrow") is not None:
32-
dtypes_pandas.extend([f"{dtype}[pyarrow]" for dtype in dtypes_pandas])
33-
34-
return tuple(dtypes_pandas)
30+
dtypes_pandas = [f"{np.dtype(dtype).name}[pyarrow]" for dtype in dtypes]
31+
return tuple(dtypes + dtypes_pandas)
3532

3633

3734
@pytest.mark.benchmark

pygmt/tests/test_clib_virtualfiles.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test the Session.open_virtualfile method.
33
"""
44

5-
from importlib.util import find_spec
65
from pathlib import Path
76

87
import numpy as np
@@ -32,19 +31,6 @@ def fixture_dtypes():
3231
return [dtype for dtype in DTYPES_NUMERIC if dtype != np.timedelta64]
3332

3433

35-
@pytest.fixture(scope="module", name="dtypes_pandas")
36-
def fixture_dtypes_pandas(dtypes):
37-
"""
38-
List of supported pandas dtypes.
39-
"""
40-
dtypes_pandas = dtypes.copy()
41-
42-
if find_spec("pyarrow") is not None:
43-
dtypes_pandas.extend([f"{dtype}[pyarrow]" for dtype in dtypes_pandas])
44-
45-
return tuple(dtypes_pandas)
46-
47-
4834
@pytest.mark.benchmark
4935
def test_open_virtualfile(dtypes):
5036
"""

0 commit comments

Comments
 (0)