Datetimelike add/sub catch cases more explicitly, tests
State: closed

Align some of the dispatching logic between that is currently special-cased by PeriodIndex.

Should avoid overlap with #19903.

Catch some currently-implicit cases explicitly.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Datetime
description: Datetime data dtype
name: Timedelta
description: Timedelta data type
name: Period
description: Period data type

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19912?src=pr&el=h1) Report
> Merging [#19912](https://codecov.io/gh/pandas-dev/pandas/pull/19912?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/6ef4be3f8f269f147b5abedecf7da6f19af305d3?src=pr&el=desc) will **decrease** coverage by `0.05%`.
> The diff coverage is `78.04%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/19912/graphs/tree.svg?height=150&width=650&token=eZ4WkYLtcO&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/19912?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #19912      +/-   ##
==========================================
- Coverage   91.69%   91.63%   -0.06%     
==========================================
  Files         150      150              
  Lines       48981    49056      +75     
==========================================
+ Hits        44913    44953      +40     
- Misses       4068     4103      +35
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.01% <78.04%> (-0.06%)` | :arrow_down: |
| #single | `41.82% <24.39%> (-0.04%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19912?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/19912/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.5% <100%> (-0.01%)` | :arrow_down: |
| [pandas/core/indexes/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/19912/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy90aW1lZGVsdGFzLnB5) | `91.03% <100%> (-0.15%)` | :arrow_down: |
| [pandas/core/indexes/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/19912/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9wZXJpb2QucHk=) | `92.57% <57.89%> (-2.08%)` | :arrow_down: |
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/19912/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `96.7% <93.75%> (-0.13%)` | :arrow_down: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/19912/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.22% <0%> (-1.74%)` | :arrow_down: |
| [pandas/core/groupby.py](https://codecov.io/gh/pandas-dev/pandas/pull/19912/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS5weQ==) | `92.14% <0%> (-0.18%)` | :arrow_down: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/19912/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `95.89% <0%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19912?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19912?src=pr&el=footer). Last update [6ef4be3...58457d4](https://codecov.io/gh/pandas-dev/pandas/pull/19912?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

> well, you are adding code here, not removing code, so not sure what is changing

This code block is based on 697-701.  Unfortunately there is a non-arithmetic method that can go down that same path, so we can't rip that out.
thanks!