Closed
Copy link
Description
(Saving this for the upcoming sprints, ideally)
Let's remove the use of assert_warns
, assert_warns_message
These should be replaced with the pytest context manager:
https://doc.pytest.org/en/reorganize-docs/recwarn.html
with pytest.warns(TheWarning, match="the expected message"):
function_call_here()
For contributors: pick one of the modules, and please comment on this issue saying e.g. "I'm working on cluster/tests", to avoid other contributors choosing the same modules.
You can see all the occurrences of the entries that need to be removed with e.g. git grep "assert_warns" sklearn/ensemble/tests/.