TST: GH#26367 Verify whether Pandas import succeeds when setting filt…
…erwarnings

- [x] closes #26367
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Thanks for working on this, but I don't think this approach will work. Pandas is loaded in the pytest conftest, and so by the time we get to this test we've already imported pandas. Since Python caches imported modules, importing again won't re-trigger the warnings.

I think this is covered at https://github.com/pandas-dev/pandas/blob/37662ea387e17a4aca1f83445daeea977e145a9b/ci/code_checks.sh#L252, where we start a new processes and check for warnings / errors. Thanks for the PR @avinashpancham. As Tom mentioned looks like we are already testing this, but feel free to work on any of the other issues that need regression testing! 