It should be `sklearn.utils.testing.assert_warns`