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

TST replace assert_warns* by pytest.warns in ensemble/tests #19425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nuka137
Copy link
Contributor

@nuka137 nuka137 commented Feb 10, 2021

Reference Issues/PRs

#19414

What does this implement/fix? Explain your changes.

Remove the use of assert_warns and assert_warns_message from tests in ensemble/tests.

Any other comments?

The PR is for the part of #19414

@nuka137 nuka137 changed the title Remove the use of assert_warns and assert_warns_message from tests in ensemble/tests WIP: Remove the use of assert_warns and assert_warns_message from tests in ensemble/tests Feb 10, 2021
@nuka137 nuka137 changed the title WIP: Remove the use of assert_warns and assert_warns_message from tests in ensemble/tests Remove the use of assert_warns and assert_warns_message from tests in ensemble/tests Feb 10, 2021
@jeremiedbb
Copy link
Member

thanks @nuka137. Instead of matching anything, it would be better to explicitly match the warning message we're expecting

@nuka137
Copy link
Contributor Author

nuka137 commented Feb 10, 2021

@jeremiedbb

Sorry for misunderstanding the intention.
I set the expected message explicitly to the match argument.

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @nuka137

@glemaitre glemaitre changed the title Remove the use of assert_warns and assert_warns_message from tests in ensemble/tests TST replace assert_warns* by pytest.warns in ensemble/tests Feb 11, 2021
@glemaitre glemaitre self-requested a review February 11, 2021 09:31
Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I just made a small push only to solve some nitpicks that are creating a warn_msg that make the context manager easier to read.

@glemaitre
Copy link
Member

I will merge when CIs are green

@glemaitre glemaitre self-assigned this Feb 11, 2021
@glemaitre glemaitre merged commit 7f5ee92 into scikit-learn:main Feb 11, 2021
@glemaitre
Copy link
Member

Thank you @nuka137

@nuka137 nuka137 deleted the remove-assert-warns-ensemble-tests branch February 11, 2021 11:26
@glemaitre glemaitre mentioned this pull request Apr 22, 2021
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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