Skip to content

TST replace pytest.warns(None) in metrics/test_classification.py #22888

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

danifernandes-hub
Copy link
Contributor

@danifernandes-hub danifernandes-hub commented Mar 18, 2022

Reference Issues/PRs

ref #22572

What does this implement/fix? Explain your changes.

Replaces deprecated pytest.warns(None) in test_logistic.py with a warnings.catch_warnings() context handler.

Any other comments?

I believe the warning being tested was UndefinedMetricWarning, but I'm not entirely sure about that

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.

Thanks @danifernandes-hub for the PR

danifernandes-hub and others added 2 commits March 18, 2022 19:37
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
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 @danifernandes-hub

@jeremiedbb jeremiedbb added the Quick Review For PRs that are quick to review label Mar 19, 2022
Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

LGTM

@thomasjpfan thomasjpfan merged commit 8d9c7a7 into scikit-learn:main Mar 24, 2022
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Apr 6, 2022
…kit-learn#22888)

Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants