ENH: added test based on suggestion from @ebolyen