This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Get rid of deprecated assertEquals etc in tests
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: chris.jerdonek, ezio.melotti, georg.brandl, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2012-12-27 17:12 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tests_deprecated_asserts-2.7.patch serhiy.storchaka, 2012-12-27 17:12 review
tests_deprecated_asserts-3.3.patch serhiy.storchaka, 2012-12-27 17:13 review
tests_deprecated_asserts-3.4.patch serhiy.storchaka, 2012-12-27 17:13 review
Messages (10)
msg178304 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-12-27 17:12
Here is a patches that replaces deprecated unittest assert aliases (such as assertEquals) to its nondeprecated counterpart (if such usage is not intended). This eliminates deprecation warnings.
msg178336 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-12-27 21:09
LGTM.
msg178337 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-12-27 21:15
LGTM.
msg178345 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-12-27 22:47
New changeset a617a50d2766 by Serhiy Storchaka in branch '2.7':
Issue #16793. Replace deprecated unittest asserts with modern counterparts.
http://hg.python.org/cpython/rev/a617a50d2766

New changeset 6601818622ea by Serhiy Storchaka in branch '3.3':
Issue #16793. Replace deprecated unittest asserts with modern counterparts.
http://hg.python.org/cpython/rev/6601818622ea

New changeset eb3a4ae095a8 by Serhiy Storchaka in branch 'default':
Issue #16793. Replace deprecated unittest asserts with modern counterparts.
http://hg.python.org/cpython/rev/eb3a4ae095a8
msg178347 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-12-27 22:50
I haven't committed changes to lib2to3 tests as I don't sure what version they should be compatible.
msg178372 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-12-28 08:14
And please don't commit cosmetic/"cleanup" changes to bugfix branches in the future.
msg178401 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-12-28 17:39
Sorry. I were understand that patches were approved by several core devs. This issue was created for fixing regression from issue16045, but then I saw yet some forgotten deprecated asserts. If you want, I will revert this additional changes in 2.7 and 3.3.
msg178430 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-12-28 21:20
Like Raymond said in the other issue: it's not going to be a problem once committed, but please be mindful of what you commit to bugfix branches in the future.
msg178431 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-12-28 21:25
> And please don't commit cosmetic/"cleanup" changes to bugfix branches in the future.

Note that those methods are deprecated and thus raise deprecation warnings when the tests are run.  It's not just a simple cosmetic/cleanup change IMHO.
msg178437 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-12-28 21:57
That makes it more of a fix, true.
History
Date User Action Args
2022-04-11 14:57:39adminsetgithub: 60997
2012-12-28 21:57:06georg.brandlsetmessages: + msg178437
2012-12-28 21:25:35ezio.melottisetmessages: + msg178431
2012-12-28 21:20:29georg.brandlsetmessages: + msg178430
2012-12-28 17:39:28serhiy.storchakasetmessages: + msg178401
2012-12-28 08:14:21georg.brandlsetnosy: + georg.brandl
messages: + msg178372
2012-12-27 22:50:43serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg178347

stage: commit review -> resolved
2012-12-27 22:47:04python-devsetnosy: + python-dev
messages: + msg178345
2012-12-27 21:15:20ezio.melottisetnosy: + ezio.melotti

messages: + msg178337
stage: patch review -> commit review
2012-12-27 21:09:37chris.jerdoneksetmessages: + msg178336
2012-12-27 21:01:36chris.jerdoneksetnosy: + chris.jerdonek
2012-12-27 17:16:40serhiy.storchakalinkissue16784 dependencies
2012-12-27 17:13:37serhiy.storchakasetfiles: + tests_deprecated_asserts-3.4.patch
2012-12-27 17:13:14serhiy.storchakasetfiles: + tests_deprecated_asserts-3.3.patch
2012-12-27 17:12:36serhiy.storchakacreate