-
-
Notifications
You must be signed in to change notification settings - Fork 11.9k
MAINT: remove internal uses of assert_warns and suppress_warnings #29322
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
seberg
left a comment
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.
Looks good to me, didn't find any larger change that I would worry about. I suspect many would be better as np.errstate, but sometimes that may also be less precise (i.e. doesn't include the function that caused the warning).
The one thing I think, I care about a bit is that it would be nice to use @pytest.mark.filterwarnings() instead of those massive indentations. (Using pytest.warns() as rec would also make the diff smaller in a few places and be nicer).
But, overall nice. And pytest.warns and some other changes improve things quite a bit!
|
There are some unrelated failures because of cache mismatches reported by apt. Let's bring this in - thanks for looking this over and the suggestions @seberg! |
…mpy#29322) * MAINT: remove internal uses of assert_warns and suppress_warnings * MAINT: adjust check for ignore filters in warnings tests * MAINT: simplify filtering per review comments * MAINT: fix warnings test * MAINT: appease linter
Towards fixing #29293, also see scipy/scipy#23275 where I did this in SciPy.
The only nontrivial changes (IMO, anyway) are in
numpy/ma/tests/test_core.py.