TST: fixturize test_to_html alignment checks
State: closed

https://github.com/pandas-dev/pandas/pull/24873#issuecomment-456641936

re-use of fixtures through indirect parametrization.

a hierarchy of fixtures to ultimately create a dataframe fixture containing 16 dataframes of combinations of named and unnamed, single level and multi index independently on the row and columns index.

this dataframe fixture is then reused through indirect parametrization of the dataframe values, the index and column index labels and the index and column index names

both the test functions consist of only two lines

```
result = ...
assert result == ...
```

the diff is a bit cluttered since a function used by the fixtures, `expected_html` has been moved into conftest and converted to a fixture.


Labels:

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

```diff
@@           Coverage Diff           @@
##           master   #24887   +/-   ##
=======================================
  Coverage   92.39%   92.39%           
=======================================
  Files         166      166           
  Lines       52413    52413           
=======================================
  Hits        48425    48425           
  Misses       3988     3988
```

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


------

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

```diff
@@           Coverage Diff           @@
##           master   #24887   +/-   ##
=======================================
  Coverage   92.39%   92.39%           
=======================================
  Files         166      166           
  Lines       52413    52413           
=======================================
  Hits        48425    48425           
  Misses       3988     3988
```

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


------

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

i'll try and find an better example that'll be worthwhile merging rather than this overzealous creation of fixtures just to demonstrate indirect parametrization.