STY: use pytest.raises context manager (tests/test_*)
State: closed

xref #24332

Labels:
name: CI
description: Continuous Integration
name: Code Style
description: Code style, linting, code_checks

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25452?src=pr&el=h1) Report
> Merging [#25452](https://codecov.io/gh/pandas-dev/pandas/pull/25452?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/aa084162bcaa7ce0efdc044bc8077f6bfca70674?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #25452      +/-   ##
==========================================
+ Coverage   91.74%   91.74%   +<.01%     
==========================================
  Files         173      173              
  Lines       52923    52923              
==========================================
+ Hits        48554    48555       +1     
+ Misses       4369     4368       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.31% <ø> (ø)` | :arrow_up: |
| #single | `41.73% <ø> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25452?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/25452/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `87.66% <0%> (+0.09%)` | :arrow_up: |

------

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

```diff
@@           Coverage Diff           @@
##           master   #25452   +/-   ##
=======================================
  Coverage   91.74%   91.74%           
=======================================
  Files         173      173           
  Lines       52923    52923           
=======================================
  Hits        48555    48555           
  Misses       4368     4368
```

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


------

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

ci failing because of isort 4.3.8, #25455 fixes.
thanks @simonjayhawkins 
looks like this broke wheels: https://travis-ci.org/MacPython/pandas-wheels/jobs/500164070

@simonjayhawkins can you fixup. thanks.