Issue 16793: Get rid of deprecated assertEquals etc in tests (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/60997

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 , 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:39 admin set github: 60997
2012-12-28 21:57:06 georg.brandl set messages: +
2012-12-28 21:25:35 ezio.melotti set messages: +
2012-12-28 21:20:29 georg.brandl set messages: +
2012-12-28 17:39:28 serhiy.storchaka set messages: +
2012-12-28 08:14:21 georg.brandl set nosy: + georg.brandlmessages: +
2012-12-27 22:50:43 serhiy.storchaka set status: open -> closedresolution: fixedmessages: + stage: commit review -> resolved
2012-12-27 22:47:04 python-dev set nosy: + python-devmessages: +
2012-12-27 21:15:20 ezio.melotti set nosy: + ezio.melottimessages: + stage: patch review -> commit review
2012-12-27 21:09:37 chris.jerdonek set messages: +
2012-12-27 21:01:36 chris.jerdonek set nosy: + chris.jerdonek
2012-12-27 17:16:40 serhiy.storchaka link issue16784 dependencies
2012-12-27 17:13:37 serhiy.storchaka set files: + tests_deprecated_asserts-3.4.patch
2012-12-27 17:13:14 serhiy.storchaka set files: + tests_deprecated_asserts-3.3.patch
2012-12-27 17:12:36 serhiy.storchaka create