Skip to content

TST replace pytest.warns(None) in preprocessing/test_function_transformer.py #22937

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

Reference Issues/PRs

Addresses #22572

What does this implement/fix? Explain your changes.

  • Removes the pytest.warns(None) replacing it with warnings.catch_warnings() and a simple filter("error")

Any other comments?

Looking at the code for the module I'm pretty sure we check if it raises a UserWarning, however I might be wrong

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.

Thank you for the PR! Looking at the commit that added these test: 8472350 I agree they were checking for UserWarnings.

@thomasjpfan thomasjpfan added Quick Review For PRs that are quick to review No Changelog Needed labels Mar 24, 2022
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.

@jeremiedbb jeremiedbb merged commit f3f8967 into scikit-learn:main Mar 24, 2022
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Apr 6, 2022
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.

3 participants