Here, we should use assert_warns from sklearn.utils.testing.