[New-bugs-announce] [issue45162] Remove old deprecated unittest features

Serhiy Storchaka report at bugs.python.org
Fri Sep 10 06:15:06 EDT 2021


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

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.

----------
components: Library (Lib)
messages: 401568
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Remove old deprecated unittest features
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45162>
_______________________________________


More information about the New-bugs-announce mailing list