REF/TST: replace capture_stdout with pytest capsys fixture
State: closed

follow-on from #24496

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

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

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

```diff
@@            Coverage Diff             @@
##           master   #24501      +/-   ##
==========================================
- Coverage    92.3%    92.3%   -0.01%     
==========================================
  Files         166      166              
  Lines       52412    52405       -7     
==========================================
- Hits        48381    48374       -7     
  Misses       4031     4031
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.73% <ø> (-0.01%)` | :arrow_down: |
| #single | `43.04% <ø> (-0.01%)` | :arrow_down: |

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

------

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

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

```diff
@@            Coverage Diff             @@
##           master   #24501      +/-   ##
==========================================
- Coverage   92.31%    92.3%   -0.01%     
==========================================
  Files         166      166              
  Lines       52391    52384       -7     
==========================================
- Hits        48363    48355       -8     
- Misses       4028     4029       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.73% <ø> (-0.01%)` | :arrow_down: |
| #single | `43.04% <ø> (-0.01%)` | :arrow_down: |

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

------

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

can you merge master
ping on green.
@jreback green!
thanks @simonjayhawkins