Separate tests specific to tslibs modules
State: closed

Going through the tests in tests/scalars, tests/indexes/datetimes, tests/indexes/timedeltas, tests/indexes/period, there is a lot of duplication and a lot of thematically inappropriate placement.  This is a natural result of tests being added over the years.

One result of this, though, is that its easy to miss certain corner cases (#17991, #7996).

There are two things I'd like to do here.  First is gather tests specific to `tslibs` modules so they can be self-contained.  This PR starts that for `tslibs.parsing`.

Second is to go through tests.indexes centralize arithmetic tests, deduplicate where needed (#18026).  This is a big task without an immediate payoff, so I want to get the go-ahead before jumping in.

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


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

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=h1) Report
> Merging [#18036](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8449ffd90eb07abaa76b5c17e2a7fa753dd881f8?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #18036      +/-   ##
==========================================
+ Coverage   91.24%   91.25%   +<.01%     
==========================================
  Files         163      163              
  Lines       50100    50100              
==========================================
+ Hits        45714    45717       +3     
+ Misses       4386     4383       -3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.06% <ø> (+0.02%)` | :arrow_up: |
| #single | `40.24% <ø> (-0.06%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.75% <0%> (-0.1%)` | :arrow_down: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.2% <0%> (+1.81%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18036?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/18036?src=pr&el=footer). Last update [8449ffd...a99cd6f](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=h1) Report
> Merging [#18036](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8449ffd90eb07abaa76b5c17e2a7fa753dd881f8?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #18036      +/-   ##
==========================================
+ Coverage   91.24%   91.25%   +<.01%     
==========================================
  Files         163      163              
  Lines       50100    50100              
==========================================
+ Hits        45714    45717       +3     
+ Misses       4386     4383       -3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.06% <ø> (+0.02%)` | :arrow_up: |
| #single | `40.24% <ø> (-0.06%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.75% <0%> (-0.1%)` | :arrow_down: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `65.2% <0%> (+1.81%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18036?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/18036?src=pr&el=footer). Last update [8449ffd...beca092](https://codecov.io/gh/pandas-dev/pandas/pull/18036?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

you took out 15 tests and added back 10, what happened?
There was a Travis stall in test_clipboard (I think), needed to re-start CI, so needed to make a new commit.  As it happens, `tests.indexes.datetimes.test_ops.TestDateTimeIndexToJulianDate` is a duplicate of `tests.indexes.datetimes.test_misc.TestDateTimeIndexToJulianDate`, so I removed the former.
thanks!
as far as fully exercising numeric ops. all for it. Most of these are tested directly thru a single inheritance mechnaism revolving around subclassing the mixins in test_base.py You can certainly isolate these and add, but this is quite tricky, and we have to assure that we are not losing coverage.