@@ -897,7 +897,7 @@ def test_dt64arr_add_sub_td64ndarray(self, tz_naive_fixture, box_with_array):
897
897
)
898
898
def test_dt64arr_sub_dtscalar (self , box_with_array , ts ):
899
899
# GH#8554, GH#22163 DataFrame op should _not_ return dt64 dtype
900
- idx = pd .date_range ("2013-01-01" , periods = 3 )
900
+ idx = pd .date_range ("2013-01-01" , periods = 3 ). _with_freq ( None )
901
901
idx = tm .box_expected (idx , box_with_array )
902
902
903
903
expected = pd .TimedeltaIndex (["0 Days" , "1 Day" , "2 Days" ])
@@ -912,7 +912,7 @@ def test_dt64arr_sub_datetime64_not_ns(self, box_with_array):
912
912
dt64 = np .datetime64 ("2013-01-01" )
913
913
assert dt64 .dtype == "datetime64[D]"
914
914
915
- dti = pd .date_range ("20130101" , periods = 3 )
915
+ dti = pd .date_range ("20130101" , periods = 3 ). _with_freq ( None )
916
916
dtarr = tm .box_expected (dti , box_with_array )
917
917
918
918
expected = pd .TimedeltaIndex (["0 Days" , "1 Day" , "2 Days" ])
@@ -926,6 +926,7 @@ def test_dt64arr_sub_datetime64_not_ns(self, box_with_array):
926
926
927
927
def test_dt64arr_sub_timestamp (self , box_with_array ):
928
928
ser = pd .date_range ("2014-03-17" , periods = 2 , freq = "D" , tz = "US/Eastern" )
929
+ ser = ser ._with_freq (None )
929
930
ts = ser [0 ]
930
931
931
932
ser = tm .box_expected (ser , box_with_array )
0 commit comments