-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
MNT Replace pytest.warns(None) in test_neighbors #23142
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
MNT Replace pytest.warns(None) in test_neighbors #23142
Conversation
if global_dtype == np.float32: | ||
# Warning from Scipy | ||
ExceptionToAssert = DeprecationWarning | ||
warn_context_manager = pytest.warns(DeprecationWarning) |
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.
The CI that uses sets SKLEARN_RUN_FLOAT32_TESTS=1
, has an older SciPy version so this test is not covered.
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.
It should be covered now that we run all jobs in the azure cron job
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
Imo the check for the specific warning of wminkowski should just be in a separate test but let's keep as is for now for simplicity. |
Reference Issues/PRs
Follow up to #22572
What does this implement/fix? Explain your changes.
This PR removes the use of
pytest.warns
intest_neighbors
that was inpytest.parameterize
.