Skip to content

Commit f0e75f3

Browse files
authored
TST: enable commented-out test (#44591)
1 parent fa56390 commit f0e75f3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pandas/tests/arrays/test_datetimelike.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -1427,11 +1427,13 @@ def test_from_obscure_array(dtype, array_likes):
14271427
expected = func(data)[0]
14281428
tm.assert_equal(result, expected)
14291429

1430-
# FIXME: dask and memoryview both break on these
1431-
# func = {"M8[ns]": pd.to_datetime, "m8[ns]": pd.to_timedelta}[dtype]
1432-
# result = func(arr).array
1433-
# expected = func(data).array
1434-
# tm.assert_equal(result, expected)
1430+
if not isinstance(data, memoryview):
1431+
# FIXME(GH#44431) these raise on memoryview and attempted fix
1432+
# fails on py3.10
1433+
func = {"M8[ns]": pd.to_datetime, "m8[ns]": pd.to_timedelta}[dtype]
1434+
result = func(arr).array
1435+
expected = func(data).array
1436+
tm.assert_equal(result, expected)
14351437

14361438
# Let's check the Indexes while we're here
14371439
idx_cls = {"M8[ns]": DatetimeIndex, "m8[ns]": TimedeltaIndex}[dtype]

0 commit comments

Comments
 (0)