@@ -360,13 +360,15 @@ def test_subtraction_ops(self):
360360 expected = DatetimeIndex (["20121231" , NaT , "20121230" ], name = "foo" )
361361 tm .assert_index_equal (result , expected )
362362
363- def test_subtraction_ops_with_tz (self ):
363+ def test_subtraction_ops_with_tz (self , box_with_array ):
364364
365365 # check that dt/dti subtraction ops with tz are validated
366366 dti = pd .date_range ("20130101" , periods = 3 )
367+ dti = tm .box_expected (dti , box_with_array )
367368 ts = Timestamp ("20130101" )
368369 dt = ts .to_pydatetime ()
369370 dti_tz = pd .date_range ("20130101" , periods = 3 ).tz_localize ("US/Eastern" )
371+ dti_tz = tm .box_expected (dti_tz , box_with_array )
370372 ts_tz = Timestamp ("20130101" ).tz_localize ("US/Eastern" )
371373 ts_tz2 = Timestamp ("20130101" ).tz_localize ("CET" )
372374 dt_tz = ts_tz .to_pydatetime ()
@@ -416,27 +418,32 @@ def _check(result, expected):
416418
417419 result = dti_tz - dt_tz
418420 expected = TimedeltaIndex (["0 days" , "1 days" , "2 days" ])
419- tm .assert_index_equal (result , expected )
421+ expected = tm .box_expected (expected , box_with_array )
422+ tm .assert_equal (result , expected )
420423
421424 result = dt_tz - dti_tz
422425 expected = TimedeltaIndex (["0 days" , "-1 days" , "-2 days" ])
423- tm .assert_index_equal (result , expected )
426+ expected = tm .box_expected (expected , box_with_array )
427+ tm .assert_equal (result , expected )
424428
425429 result = dti_tz - ts_tz
426430 expected = TimedeltaIndex (["0 days" , "1 days" , "2 days" ])
427- tm .assert_index_equal (result , expected )
431+ expected = tm .box_expected (expected , box_with_array )
432+ tm .assert_equal (result , expected )
428433
429434 result = ts_tz - dti_tz
430435 expected = TimedeltaIndex (["0 days" , "-1 days" , "-2 days" ])
431- tm .assert_index_equal (result , expected )
436+ expected = tm .box_expected (expected , box_with_array )
437+ tm .assert_equal (result , expected )
432438
433439 result = td - td
434440 expected = Timedelta ("0 days" )
435441 _check (result , expected )
436442
437443 result = dti_tz - td
438444 expected = DatetimeIndex (["20121231" , "20130101" , "20130102" ], tz = "US/Eastern" )
439- tm .assert_index_equal (result , expected )
445+ expected = tm .box_expected (expected , box_with_array )
446+ tm .assert_equal (result , expected )
440447
441448 def test_dti_tdi_numeric_ops (self ):
442449 # These are normally union/diff set-like ops
0 commit comments