-
Notifications
You must be signed in to change notification settings - Fork 144
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
Rename arguments of assert_pixels_eq
#605
Comments
If that order was unexpected why not just fix that probably accidental mistake? |
This is a common mistake, everyone will make it at some point. We can fix this once and for all. |
Isn't it still useful to have a convention of argument order though? It makes reading the source code easier. |
But you don't need a biased standard output for that, name a variable. |
Fair enough, I would still suggest fixing the wrongly ordered assert though for consistencies sake. |
I prefer to have a consistent ordering of actual vs expected values in test definitions and error messages. I’ll leave this issue open until I’ve checked for other tests with back to front arguments in their assertions. |
Currently, the first argument is named as
actual
and the second asexpected
. But even inimageproc
tests, someone has already messed up the order. For me, the standard output was very unexpected.Therefore, I suggest simply renaming the arguments to
left
andright
, similar to rust stdlib.The text was updated successfully, but these errors were encountered: