-
-
Notifications
You must be signed in to change notification settings - Fork 26k
[MRG] MNT removing assert_equal, etc -- continued #14232
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
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.
Thanks for working on this @NicolasHug !
assert args_store == [X], ('Incorrect positional arguments passed to ' | ||
'func: {args}'.format(args=args_store)) | ||
|
||
assert not kwargs_store, ('Unexpected keyword arguments passed to ' |
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.
strictly speaking, not kwargs_store
is True
if kwargs_store == False
, or kwargs is None
. I think it's safer if we check it to be exactly what we want.
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.
I'm not sure I follow: kwargs_store
is a dict? We just check that it's empty
You mean you want assert kwargs_store == {}
?
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.
Yeah I prefer the assert kwargs_store == {}
, but you're right that here it's a dict. So never mind.
This LGTM then.
assert args_store == [X], ('Incorrect positional arguments passed ' | ||
'to func: {args}'.format(args=args_store)) | ||
|
||
assert not kwargs_store, ('Unexpected keyword arguments passed to ' |
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.
same here
Addresses (and closes?) #14215
Follow up to #14222
There are still a few occurrences of
np.testing.assert_equal
but I guess it's worth keeping: it is used to deeply compare lists.This PR also deprecates: