TST #24444 added tests
At last, there are no issues at all. I've made a new PR.

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