@@ -897,7 +897,7 @@ def test_dt64arr_add_sub_td64ndarray(self, tz_naive_fixture, box_with_array):
897897 )
898898 def test_dt64arr_sub_dtscalar (self , box_with_array , ts ):
899899 # 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 )
901901 idx = tm .box_expected (idx , box_with_array )
902902
903903 expected = pd .TimedeltaIndex (["0 Days" , "1 Day" , "2 Days" ])
@@ -912,7 +912,7 @@ def test_dt64arr_sub_datetime64_not_ns(self, box_with_array):
912912 dt64 = np .datetime64 ("2013-01-01" )
913913 assert dt64 .dtype == "datetime64[D]"
914914
915- dti = pd .date_range ("20130101" , periods = 3 )
915+ dti = pd .date_range ("20130101" , periods = 3 ). _with_freq ( None )
916916 dtarr = tm .box_expected (dti , box_with_array )
917917
918918 expected = pd .TimedeltaIndex (["0 Days" , "1 Day" , "2 Days" ])
@@ -926,6 +926,7 @@ def test_dt64arr_sub_datetime64_not_ns(self, box_with_array):
926926
927927 def test_dt64arr_sub_timestamp (self , box_with_array ):
928928 ser = pd .date_range ("2014-03-17" , periods = 2 , freq = "D" , tz = "US/Eastern" )
929+ ser = ser ._with_freq (None )
929930 ts = ser [0 ]
930931
931932 ser = tm .box_expected (ser , box_with_array )
0 commit comments