-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Parameter order in assertEqual() statements #440
Comments
(actual, expected) looks good to me. I am in favour of consistency. |
I think conforming to the Python doc basic example is a god idea. (Actual, expected) seems right. |
* protein-translation: update tests to v1.1.0 * protein-translation: adjust assertion param order (#440) * protein-translation: remove redundant utilities in tests
FYI -- if you run the tests in PyCharm (as I'm doing with my students) PyCharm shows the Expected/Actual results in the wrong order. The JetBrains bug for this behaviour is https://youtrack.jetbrains.com/issue/PY-27267. |
@nikclayton thank you for adding that info here. We've run into that issue before here, but it's good to document it as a known issue. |
We have both ways of ordering the parameters actual, expected result of the
assertEqual()
method.While the Python implementation uses indifferent names (first, second - code) all examples use the order actual followed by expected (python doc – basic-example).
I think it would be better to be consistent within this track. As I personally don't have any preferences I would just follow the official python documentation examples and default to
self.assertEqual(actual, expected)
.@rootulp @pheanex do you have any opinions about this?
The text was updated successfully, but these errors were encountered: