You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's remove the use of assert_equal, assert_greater, and assert_greater_equal in our tests.
These should be changed to simply assert a == b, assert a > b or assert a >= b.
For contributors: pick one of the modules below, and please comment on this issue saying e.g. "I'm working on cluster/tests", to avoid other contributors choosing the same modules.
You can see all the occurrences of the entries that need to be removed with e.g. git grep "assert_equal" sklearn/ensemble/tests/.
I agree that we need good issues for sprints, but I'm not sure this one is it.
IMO it would be much preferable to use an automated tool (such as nose2pytest) to do this conversion in one go (or a few PRs). It would save time both for contributors and reviewers. There are 1700 occurrences of assert_equal, as a reviewer I would rather not wonder if there is a typo in one of them. At least with automated tools, if there are errors they would be more systematic and easier to detect.
With #14222 merged, there is only a few occurrences left (e.g. np.testing.assert_equal) those can probably be done manually. Also it would be nice to deprecate utils.assert_equal & co. so that they are not re-introduced in new PRs (there is still CI that fails on deprecation warnings right?)
Activity
[-]Remove assert_equal from tests[/-][+]Remove assert_equal and co. from the tests[/+]rth commentedon Jun 28, 2019
I agree that we need good issues for sprints, but I'm not sure this one is it.
IMO it would be much preferable to use an automated tool (such as nose2pytest) to do this conversion in one go (or a few PRs). It would save time both for contributors and reviewers. There are 1700 occurrences of
assert_equal, as a reviewer I would rather not wonder if there is a typo in one of them. At least with automated tools, if there are errors they would be more systematic and easier to detect.rth commentedon Jul 1, 2019
With #14222 merged, there is only a few occurrences left (e.g.
np.testing.assert_equal) those can probably be done manually. Also it would be nice to deprecateutils.assert_equal& co. so that they are not re-introduced in new PRs (there is still CI that fails on deprecation warnings right?)NicolasHug commentedon Jul 1, 2019
@adrinjalali are you working on it? Else I'll finish
adrinjalali commentedon Jul 1, 2019
No go ahead, thanks :)
rth commentedon Jul 2, 2019
I double checked that non of
assert_equaletc are left in tests.Closing as resolved. Thanks @NicolasHug and @adrinjalali !