Title: Remove old deprecated unittest features
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.11
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, michael.foord, rbcollins, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2021-09-10 10:15 by serhiy.storchaka, last changed 2021-09-10 10:23 by serhiy.storchaka.

Pull Requests
URL Status Linked Edit
PR 28268 open serhiy.storchaka, 2021-09-10 10:23
Messages (1)
msg401568 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-09-10 10:15
The proposed PR removes the following unittest features:

* "fail*" and "assert*" aliases of TestCase methods.
* Broken from start TestCase method assertDictContainsSubset().
* Ignored TestLoader.loadTestsFromModule() parameter use_load_tests.
* Old alias _TextTestResult of TextTestResult.

Most features were deprecated in 3.2, "fail*" methods in 3.1, assertNotRegexpMatches in 3.5. They were kept mostly for compatibility with 2.7 (although some of them were new in Python 3 and not compatible with 2.7).

Using deprecated assertEquals instead of assertEqual is a common error which we need to fix regularly, so removing deprecated features will not only make the current code clearer, but save as from future errors.
Date User Action Args
2021-09-10 10:23:10serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request26688
2021-09-10 10:17:22serhiy.storchakasetnosy: + rbcollins, ezio.melotti, michael.foord
2021-09-10 10:15:06serhiy.storchakacreate