Skip to content

Commit 599c019

Browse files
authored
Remove the xfail marker related to pandas<2.1 (#4426)
1 parent f83a58b commit 599c019

1 file changed

Lines changed: 4 additions & 19 deletions

File tree

pygmt/tests/test_clib_to_numpy.py

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,6 @@ def test_to_numpy_pandas_date(dtype, expected_dtype):
418418
)
419419

420420

421-
pandas_old_version = pytest.mark.xfail(
422-
condition=Version(pd.__version__) < Version("2.1"),
423-
reason="pandas 2.0 bug reported in https://github.com/pandas-dev/pandas/issues/52705",
424-
)
425-
426-
427421
@pytest.mark.parametrize(
428422
("dtype", "expected_dtype"),
429423
[
@@ -435,23 +429,14 @@ def test_to_numpy_pandas_date(dtype, expected_dtype):
435429
# pandas.DatetimeTZDtype can be given in two ways [tz is required]:
436430
# 1. pandas.DatetimeTZDtype(unit, tz)
437431
# 2. String aliases: "datetime64[unit, tz]"
438-
pytest.param(
439-
"datetime64[s, UTC]",
440-
"datetime64[s]",
441-
id="datetime64[s, tz=UTC]",
442-
marks=pandas_old_version,
443-
),
432+
pytest.param("datetime64[s, UTC]", "datetime64[s]", id="datetime64[s, tz=UTC]"),
444433
pytest.param(
445434
"datetime64[s, America/New_York]",
446435
"datetime64[s]",
447436
id="datetime64[s, tz=America/New_York]",
448-
marks=pandas_old_version,
449437
),
450438
pytest.param(
451-
"datetime64[s, +07:30]",
452-
"datetime64[s]",
453-
id="datetime64[s, +07:30]",
454-
marks=pandas_old_version,
439+
"datetime64[s, +07:30]", "datetime64[s]", id="datetime64[s, +07:30]"
455440
),
456441
# PyArrow timestamp types can be given in two ways [tz is optional]:
457442
# 1. pd.ArrowDtype(pyarrow.Timestamp(unit, tz=tz))
@@ -466,13 +451,13 @@ def test_to_numpy_pandas_date(dtype, expected_dtype):
466451
"timestamp[ms][pyarrow]",
467452
"datetime64[ms]",
468453
id="timestamp[ms][pyarrow]",
469-
marks=[skip_if_no(package="pyarrow"), pandas_old_version],
454+
marks=skip_if_no(package="pyarrow"),
470455
),
471456
pytest.param(
472457
"timestamp[us][pyarrow]",
473458
"datetime64[us]",
474459
id="timestamp[us][pyarrow]",
475-
marks=[skip_if_no(package="pyarrow"), pandas_old_version],
460+
marks=skip_if_no(package="pyarrow"),
476461
),
477462
pytest.param(
478463
"timestamp[ns][pyarrow]",

0 commit comments

Comments
 (0)