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

- [ n/a] xref #24040
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ n/a] whatsnew entry

in this PR:

- unskip `test_iloc_getitem_multiindex2`. difference in series name resolved. some tests were duplicated in `test_iloc_getitem_multiindex` 
- `.ix` removed. this was only used to generate expected values. this module is to test `.loc` functionality only. integer indexing on the numpy array used to create dataframe used instead. 
- class removed
- some renaming of variables
- and splitting and paramatrizing.

Labels:
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

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

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


# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24272?src=pr&el=h1) Report
> Merging [#24272](https://codecov.io/gh/pandas-dev/pandas/pull/24272?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/c0371288ff125cad66bc8689ab425dd4cc11c64a?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/24272/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/24272?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #24272   +/-   ##
=======================================
  Coverage   92.22%   92.22%           
=======================================
  Files         162      162           
  Lines       51785    51785           
=======================================
  Hits        47758    47758           
  Misses       4027     4027
```

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


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24272?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/24272?src=pr&el=footer). Last update [c037128...4ab1a53](https://codecov.io/gh/pandas-dev/pandas/pull/24272?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/24272?src=pr&el=h1) Report
> Merging [#24272](https://codecov.io/gh/pandas-dev/pandas/pull/24272?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/c0371288ff125cad66bc8689ab425dd4cc11c64a?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/24272/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/24272?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #24272   +/-   ##
=======================================
  Coverage   92.22%   92.22%           
=======================================
  Files         162      162           
  Lines       51785    51785           
=======================================
  Hits        47758    47758           
  Misses       4027     4027
```

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


------

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

thanks!