-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
TST replace pytest.warns(None) in test_label_propagation.py #23010
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
Conversation
This commit updates the fit(X, y) definition, in the docs, of the sklearn.covariance.EllipticEnvelope class. The original definition stated that parameter X could be of type 'array-like' or 'sparse matrix', however, an error would be thrown if a 'sparse matrix' is passed ("TypeError: A sparse matrix was passed, but dense data is required."). To resolve this, 'sparse matrix' was removed from the list of types X could be, in the docstring.
This commit is part of the process to update the docs on the sklearn.covariance.EllipticEnvelope class's fit(X, y) definition, as explained in issue #14613.
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
This commit is to resolve part of issue #22572, specifically, refactoring test_label_propagation. This is being done to update the file and address the deprecation warning from Pytest when using "pytest.warns(None)".
…l commit for PR. Added explicit warnings for warnings.simplefilter() based on test code and, added missing warnings.simplefilter() call in test_label_propagation_non_zero_normalizer test.
@jeremiedbb here is the new PR that is replacing PR #22998. I also see that the PR is currently failing due to linting errors ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @Ben3940
Thank you @jeremiedbb for your help with this |
There was a problem hiding this 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!
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Thanks @Ben3940 |
…learn#23010) Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
…learn#23010) Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Reference Issues/PRs
Part of issue #22572
What does this implement/fix? Explain your changes.
Removes use of
pytest.warns(None)
due to deprecation warning from Pytest.warnings.catch_warnings()
paired withwarnings.simplefilter("error", EXPLICIT_WARNING)
willreplace
pytest.warns(None)