Skip to content

Commit 06d67ac

Browse files
committed
requested comment
1 parent bb4c0cb commit 06d67ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/arithmetic/test_timedelta64.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,9 @@ def test_tdi_iadd_timedeltalike(self, two_hours, box_with_array):
621621
and two_hours.unit == "ns"
622622
and box_with_array is not pd.array
623623
):
624+
# The EA op has to be _actually_ inplace so does not cast to a
625+
# new dtype. For the others, the op can assign a new array
626+
# and get the dtype that normally results from `rng + two_hours`
624627
expected = expected.as_unit("ns")
625628

626629
rng = tm.box_expected(rng, box_with_array)
@@ -642,6 +645,9 @@ def test_tdi_isub_timedeltalike(self, two_hours, box_with_array):
642645
and two_hours.unit == "ns"
643646
and box_with_array is not pd.array
644647
):
648+
# The EA op has to be _actually_ inplace so does not cast to a
649+
# new dtype. For the others, the op can assign a new array
650+
# and get the dtype that normally results from `rng - two_hours`
645651
expected = expected.as_unit("ns")
646652

647653
rng = tm.box_expected(rng, box_with_array)

0 commit comments

Comments
 (0)