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

```diff
@@           Coverage Diff           @@
##           master   #21744   +/-   ##
=======================================
  Coverage   91.93%   91.93%           
=======================================
  Files         159      159           
  Lines       49719    49719           
=======================================
  Hits        45707    45707           
  Misses       4012     4012
```

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


------

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