STY: use pytest.raises context manager (resample)
State: closed

xref #24332

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

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

```diff
@@           Coverage Diff           @@
##           master   #24977   +/-   ##
=======================================
  Coverage   92.38%   92.38%           
=======================================
  Files         166      166           
  Lines       52398    52398           
=======================================
  Hits        48407    48407           
  Misses       3991     3991
```

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


------

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

```diff
@@           Coverage Diff           @@
##           master   #24977   +/-   ##
=======================================
  Coverage   92.38%   92.38%           
=======================================
  Files         166      166           
  Lines       52398    52398           
=======================================
  Hits        48407    48407           
  Misses       3991     3991
```

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


------

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

thanks @simonjayhawkins