TST: Use assert_produces_warnings in test_groupby