From 785935e7c8264f25ea7ec47b9dfa595131b67624 Mon Sep 17 00:00:00 2001 From: Brock Date: Tue, 23 Nov 2021 08:34:58 -0800 Subject: [PATCH] TST: enable commented-out test --- pandas/tests/arrays/test_datetimelike.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pandas/tests/arrays/test_datetimelike.py b/pandas/tests/arrays/test_datetimelike.py index 00a8110a399d4..9d61f57bc1f62 100644 --- a/pandas/tests/arrays/test_datetimelike.py +++ b/pandas/tests/arrays/test_datetimelike.py @@ -1427,11 +1427,13 @@ def test_from_obscure_array(dtype, array_likes): expected = func(data)[0] tm.assert_equal(result, expected) - # FIXME: dask and memoryview both break on these - # func = {"M8[ns]": pd.to_datetime, "m8[ns]": pd.to_timedelta}[dtype] - # result = func(arr).array - # expected = func(data).array - # tm.assert_equal(result, expected) + if not isinstance(data, memoryview): + # FIXME(GH#44431) these raise on memoryview and attempted fix + # fails on py3.10 + func = {"M8[ns]": pd.to_datetime, "m8[ns]": pd.to_timedelta}[dtype] + result = func(arr).array + expected = func(data).array + tm.assert_equal(result, expected) # Let's check the Indexes while we're here idx_cls = {"M8[ns]": DatetimeIndex, "m8[ns]": TimedeltaIndex}[dtype]