REF/TST: Add more pytest idiom to indexing/multiindex/test_getitem.py
State: closed

xref #24040

for this pass:

- the Test classes have been removed.

- `catch_warnings`  used for the `.ix` deprecation replaced with `@pytest.mark.filterwarnings("ignore:\\n.ix:DeprecationWarning")` at test level.

cc @jreback @gfyoung 

Labels:
name: Refactor
description: Internal refactoring of code
name: Testing
description: pandas testing functions or related to the test suite
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: MultiIndex

Comments:
Hello @simonjayhawkins! Thanks for updating the PR.

 - There are no PEP8 issues in the file [`pandas/tests/indexing/multiindex/test_getitem.py`](https://github.com/simonjayhawkins/pandas/blob/3ff615979120079a2f2a075476310a4d6ae12640/pandas/tests/indexing/multiindex/test_getitem.py) !



##### Comment last updated on December 10, 2018 at 16:06 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24053?src=pr&el=h1) Report
> Merging [#24053](https://codecov.io/gh/pandas-dev/pandas/pull/24053?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/92d25f0da6c3b1175047cba8c900e04da68920b8?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #24053   +/-   ##
=======================================
  Coverage   42.45%   42.45%           
=======================================
  Files         161      161           
  Lines       51561    51561           
=======================================
  Hits        21888    21888           
  Misses      29673    29673
```

| Flag | Coverage Δ | |
|---|---|---|
| #single | `42.45% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24053?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/strings.py](https://codecov.io/gh/pandas-dev/pandas/pull/24053/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3RyaW5ncy5weQ==) | `33% <0%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24053?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/24053?src=pr&el=footer). Last update [92d25f0...47c4ce8](https://codecov.io/gh/pandas-dev/pandas/pull/24053?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/24053?src=pr&el=h1) Report
> Merging [#24053](https://codecov.io/gh/pandas-dev/pandas/pull/24053?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/53899874f8c33bf00b68d270beee2640078f3cd6?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #24053   +/-   ##
=======================================
  Coverage   92.21%   92.21%           
=======================================
  Files         162      162           
  Lines       51761    51761           
=======================================
  Hits        47731    47731           
  Misses       4030     4030
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.61% <ø> (ø)` | :arrow_up: |
| #single | `43% <ø> (ø)` | :arrow_up: |


------

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

@jreback @gfyoung 

`test_series_getitem_multiindex` and `test_getitem_duplicates_multiindex` split and parametrized. error messages checked.

carry on and split and parametrize the remaining tests in this file within this PR or limit the diff?
thanks @simonjayhawkins keep em coming! I don't mind bigger ones, main issue is there are some other parts moving so easiest to get them in in self-contained units.