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 deprecated assertions #6286

Merged
merged 1 commit into from Aug 1, 2018

Conversation

Projects
None yet
2 participants
@Eric-Arellano
Copy link
Contributor

Eric-Arellano commented Aug 1, 2018

assertEquals and assertNotEquals have been deprecated in favor of their aliases assertEqual and assertNotEqual since Python 2.7. https://docs.python.org/2/library/unittest.html#deprecated-aliases

While they still aren't removed in Python 3.7, they cause one of the unit tests to fail in Python 3, and should be removed as they're deprecated.

This is a safe change - they are aliases of each other, and I checked to fix any unintentional renaming of Java's assertEquals, including Java code embedded into Python files.

@stuhood

stuhood approved these changes Aug 1, 2018

Copy link
Member

stuhood left a comment

Thanks!

@stuhood stuhood merged commit aa69592 into pantsbuild:master Aug 1, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Eric-Arellano Eric-Arellano deleted the Eric-Arellano:py3-fixes_rename-assert-equals branch Aug 1, 2018

CMLivingston pushed a commit to CMLivingston/pants that referenced this pull request Aug 27, 2018

Rename deprecated assertions (pantsbuild#6286)
`assertEquals` and `assertNotEquals` have been deprecated in favor of their aliases `assertEqual` and `assertNotEqual` since Python 2.7. https://docs.python.org/2/library/unittest.html#deprecated-aliases

While they still aren't removed in Python 3.7, they cause one of the unit tests to fail in Python 3, and should be removed as they're deprecated. 

This is a safe change - they are aliases of each other, and I checked to fix any unintentional renaming of Java's `assertEquals`, including Java code embedded into Python files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment