Add test for #15966
- [x] adds test for #15966, but it has been fixed already
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry -- its only an added test?
