Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove the use of assert_warns and assert_warns_message from the tests #19414

Copy link
Copy link
@glemaitre

Description

@glemaitre
Issue body actions

(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/.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.