TST: add tests for GH 6572
Merge pull request #7810 from sinhrks/test_gh6572

TST: add tests for GH 6572