[MRG] MNT removing assert_equal, etc -- continued#14232
Merged
jnothman merged 6 commits intoscikit-learn:masterfrom Jul 2, 2019
Merged
[MRG] MNT removing assert_equal, etc -- continued#14232jnothman merged 6 commits intoscikit-learn:masterfrom
jnothman merged 6 commits intoscikit-learn:masterfrom
Conversation
rth
reviewed
Jul 1, 2019
Member
rth
left a comment
There was a problem hiding this comment.
Thanks for working on this @NicolasHug !
adrinjalali
reviewed
Jul 1, 2019
| assert args_store == [X], ('Incorrect positional arguments passed to ' | ||
| 'func: {args}'.format(args=args_store)) | ||
|
|
||
| assert not kwargs_store, ('Unexpected keyword arguments passed to ' |
Member
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
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 == {}?
Member
There was a problem hiding this comment.
Yeah I prefer the assert kwargs_store == {}, but you're right that here it's a dict. So never mind.
This LGTM then.
adrinjalali
reviewed
Jul 1, 2019
| assert args_store == [X], ('Incorrect positional arguments passed ' | ||
| 'to func: {args}'.format(args=args_store)) | ||
|
|
||
| assert not kwargs_store, ('Unexpected keyword arguments passed to ' |
adrinjalali
approved these changes
Jul 1, 2019
jnothman
approved these changes
Jul 2, 2019
koenvandevelde
pushed a commit
to koenvandevelde/scikit-learn
that referenced
this pull request
Jul 12, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses (and closes?) #14215
Follow up to #14222
There are still a few occurrences of
np.testing.assert_equalbut I guess it's worth keeping: it is used to deeply compare lists.This PR also deprecates: