read_hdf closes HDF5 stores that it didn't open.
- [ ] closes #28699
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

This commit fixes #28699. I added a test for the bug.
I'm not entirely sure why these checks failed. It looks like there is some major reorganization of test_pytables.py happening right now? Can you rebase?

I'm not aware of a major reorganization of the file, but there was a recent change that removed an `except Exception:` that may be causing the merge conflict. Looks like how paths are created was changed in test_pytables.py yesterday which created some conflicts. I updated my test to the new format and rebased. Got it sorted out. The previous error was due to me using single quotes somewhere rather than double quotes, and black pandas didn't like that. lgtm. can you add a whatsnew note in bugfix of 1.0.0 for IO section. note that I am about to merge a refactor of the pytables tests, so will have to rebase on master (but shouldn't be a conflict i think). I updated the whatsnew for 1.0.0. Let me know if I need to change anything for the refactor of the pytables tests. can you merge master, we moved some tests around I merged master and resolved the conflicts. Thanks @kboone !