Fix import format tests/indexes/ "Part One"
State: closed

- [x] xref #23334
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
Run `isort -rc pandas/tests/indexes/`

PR is capped at 20 files. So this is not all the files modified from `pandas/tests/indexes/`. So this is Part One of this directory `pandas/tests/indexes/`. 


Labels:
name: Code Style
description: Code style, linting, code_checks

Comments:
Hello @thoo! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/tests/extension/base/methods.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/extension/base/methods.py) !

 - There are no PEP8 issues in the file [`pandas/tests/extension/test_categorical.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/extension/test_categorical.py) !

 - There are no PEP8 issues in the file [`pandas/tests/extension/test_interval.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/extension/test_interval.py) !

 - There are no PEP8 issues in the file [`pandas/tests/extension/test_sparse.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/extension/test_sparse.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/interval/test_astype.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/interval/test_astype.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/interval/test_construction.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/interval/test_construction.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/interval/test_interval.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/interval/test_interval.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/interval/test_interval_new.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/interval/test_interval_new.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/interval/test_interval_range.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/interval/test_interval_range.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/interval/test_interval_tree.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/interval/test_interval_tree.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/timedeltas/test_arithmetic.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/timedeltas/test_arithmetic.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/timedeltas/test_astype.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/timedeltas/test_astype.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/timedeltas/test_construction.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/timedeltas/test_construction.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/timedeltas/test_indexing.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/timedeltas/test_indexing.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/timedeltas/test_ops.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/timedeltas/test_ops.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/timedeltas/test_partial_slicing.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/timedeltas/test_partial_slicing.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/timedeltas/test_scalar_compat.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/timedeltas/test_scalar_compat.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/timedeltas/test_setops.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/timedeltas/test_setops.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/timedeltas/test_timedelta.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/timedeltas/test_timedelta.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/timedeltas/test_timedelta_range.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/timedeltas/test_timedelta_range.py) !

 - There are no PEP8 issues in the file [`pandas/tests/indexes/timedeltas/test_tools.py`](https://github.com/thoo/pandas/blob/7029ca16ab745288e7f3b63c7a645d863eabb96b/pandas/tests/indexes/timedeltas/test_tools.py) !


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

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

```diff
@@            Coverage Diff             @@
##           master   #23337      +/-   ##
==========================================
- Coverage   92.22%   92.22%   -0.01%     
==========================================
  Files         169      169              
  Lines       51261    51259       -2     
==========================================
- Hits        47277    47273       -4     
- Misses       3984     3986       +2
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.66% <ø> (-0.01%)` | :arrow_down: |
| #single | `42.23% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/23337?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/23337/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `86.64% <0%> (-0.2%)` | :arrow_down: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/23337/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `89.22% <0%> (-0.06%)` | :arrow_down: |
| [pandas/core/arrays/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/23337/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lcy5weQ==) | `97.45% <0%> (-0.01%)` | :arrow_down: |
| [pandas/core/groupby/ops.py](https://codecov.io/gh/pandas-dev/pandas/pull/23337/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9vcHMucHk=) | `96.79% <0%> (ø)` | :arrow_up: |
| [pandas/core/groupby/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/23337/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9iYXNlLnB5) | `91.83% <0%> (ø)` | :arrow_up: |
| [pandas/core/arrays/sparse.py](https://codecov.io/gh/pandas-dev/pandas/pull/23337/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3NwYXJzZS5weQ==) | `91.84% <0%> (ø)` | :arrow_up: |
| [pandas/core/groupby/grouper.py](https://codecov.io/gh/pandas-dev/pandas/pull/23337/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9ncm91cGVyLnB5) | `98.16% <0%> (ø)` | :arrow_up: |
| [pandas/core/groupby/groupby.py](https://codecov.io/gh/pandas-dev/pandas/pull/23337/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9ncm91cGJ5LnB5) | `96.48% <0%> (ø)` | :arrow_up: |
| [pandas/core/groupby/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/23337/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9jYXRlZ29yaWNhbC5weQ==) | `95.45% <0%> (ø)` | :arrow_up: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/23337/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `93.91% <0%> (ø)` | :arrow_up: |
| ... and [1 more](https://codecov.io/gh/pandas-dev/pandas/pull/23337/diff?src=pr&el=tree-more) | |

------

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

@thoo pls remove the fixed files from the setup.cfg as then the flaker will check.
Sorry. I missed that part. 
btw, since lots of these PR's, any time you push merge in master as well.
@jreback  Pass all checks. 
i think this was duplicated somehow.