TST: Add test decorators for redirecting stdout and stderr
Add testing decorators for redirecting `stdout` and `stderr`.

xref <a href="https://github.com/pandas-dev/pandas/pull/15925#discussion_r110283696">#15925 (comment)</a>