TST: Check more error messages in tests
State: closed

Just replaces some `pytest.raises` with more useful (I think) `tm.assert_raises_regexp`.

xref #16521.

Labels:
name: Testing
description: pandas testing functions or related to the test suite

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

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

```diff
@@            Coverage Diff             @@
##           master   #17075      +/-   ##
==========================================
- Coverage   91.05%   91.01%   -0.05%     
==========================================
  Files         161      161              
  Lines       49396    49396              
==========================================
- Hits        44977    44956      -21     
- Misses       4419     4440      +21
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.78% <ø> (-0.03%)` | :arrow_down: |
| #single | `40.28% <ø> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17075?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17075?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/17075?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `63.23% <0%> (-1.82%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17075?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.66% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17075?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/17075?src=pr&el=footer). Last update [a7b4a9c...05a8a3f](https://codecov.io/gh/pandas-dev/pandas/pull/17075?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/17075?src=pr&el=h1) Report
> Merging [#17075](https://codecov.io/gh/pandas-dev/pandas/pull/17075?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/f9a552dc12262d1d208f9cdc2c5ffd1731f9c361?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #17075      +/-   ##
==========================================
- Coverage   91.02%   91.01%   -0.02%     
==========================================
  Files         161      161              
  Lines       49396    49396              
==========================================
- Hits        44965    44956       -9     
- Misses       4431     4440       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.78% <ø> (ø)` | :arrow_up: |
| #single | `40.28% <ø> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17075?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17075?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17075?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.66% <0%> (-0.1%)` | :arrow_down: |

------

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

> I prefer fixtures rather than using setup_class

That's fair in light of modularity.
@jreback : Everything is green.  PTAL.
thanks!