REF/TST: remove patch from testing.py
State: closed

logical follow-on from #24501

replace use of `patch` from `testing.py` with `pytest` builtin fixture `monkeypatch`

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

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

```diff
@@            Coverage Diff             @@
##           master   #24515      +/-   ##
==========================================
+ Coverage   31.88%   31.88%   +<.01%     
==========================================
  Files         166      166              
  Lines       52434    52425       -9     
==========================================
- Hits        16718    16717       -1     
+ Misses      35716    35708       -8
```

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

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

------

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

```diff
@@            Coverage Diff             @@
##           master   #24515      +/-   ##
==========================================
+ Coverage   31.88%   31.88%   +<.01%     
==========================================
  Files         166      166              
  Lines       52434    52425       -9     
==========================================
- Hits        16718    16717       -1     
+ Misses      35716    35708       -8
```

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

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

------

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

```diff
@@            Coverage Diff             @@
##           master   #24515      +/-   ##
==========================================
+ Coverage   31.88%   31.88%   +<.01%     
==========================================
  Files         166      166              
  Lines       52434    52425       -9     
==========================================
- Hits        16718    16717       -1     
+ Misses      35716    35708       -8
```

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

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

------

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

thanks!

if you happen to isort things, and its on the list can edit setup.cfg in the future (also PR's to finish that up ok too!)