TST: Use subprocess.Popen as context managers
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them

Might help address the elusive `ResourceWarnings` in the CI
https://github.com/pandas-dev/pandas/runs/4317219787?check_suite_focus=true
looks fine. you might want to propagate this upstream to the clipboard library itself as we vendor this.