mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-45162: Revert "Remove many old deprecated unittest features" (GH-30935)
Revert "bpo-45162: Remove many old deprecated unittest features (GH-28268)"
This reverts commit b0a6ede3d0
.
We're deferring this change until 3.12 while upstream projects that use
the legacy assertion method names are fixed. See the issue for links
to the discussion. Many upstream projects now have issues and PRs
filed.
This commit is contained in:
parent
9f0881476e
commit
b50322d203
14 changed files with 376 additions and 55 deletions
|
@ -489,28 +489,6 @@ Removed
|
|||
and :class:`fileinput.FileInput`, deprecated since Python 3.9.
|
||||
(Contributed by Hugo van Kemenade in :issue:`45132`.)
|
||||
|
||||
* Removed many old deprecated :mod:`unittest` features:
|
||||
|
||||
- :class:`~unittest.TestCase` method aliases ``failUnlessEqual``,
|
||||
``failIfEqual``, ``failUnless``, ``failIf``, ``failUnlessRaises``,
|
||||
``failUnlessAlmostEqual``, ``failIfAlmostEqual`` (deprecated in Python 3.1),
|
||||
``assertEquals``, ``assertNotEquals``, ``assert_``, ``assertAlmostEquals``,
|
||||
``assertNotAlmostEquals``, ``assertRegexpMatches``, ``assertRaisesRegexp``
|
||||
(deprecated in Python 3.2), and ``assertNotRegexpMatches`` (deprecated in
|
||||
Python 3.5).
|
||||
|
||||
- Undocumented and broken :class:`~unittest.TestCase` method
|
||||
``assertDictContainsSubset`` (deprecated in Python 3.2).
|
||||
|
||||
- Undocumented :meth:`<unittest.TestLoader.loadTestsFromModule>
|
||||
TestLoader.loadTestsFromModule` parameter *use_load_tests* (deprecated
|
||||
and ignored since Python 3.2).
|
||||
|
||||
- An alias of the :class:`~unittest.TextTestResult` class:
|
||||
``_TextTestResult`` (deprecated in Python 3.2).
|
||||
|
||||
(Contributed by Serhiy Storchaka in :issue:`45162`.)
|
||||
|
||||
* The following deprecated functions and methods are removed in the :mod:`gettext`
|
||||
module: :func:`~gettext.lgettext`, :func:`~gettext.ldgettext`,
|
||||
:func:`~gettext.lngettext` and :func:`~gettext.ldngettext`.
|
||||
|
|
|
@ -1815,7 +1815,8 @@ names.
|
|||
=============================== ==============================
|
||||
|
||||
Likewise, the ``TestCase.fail*`` methods deprecated in Python 3.1 are expected
|
||||
to be removed in Python 3.3.
|
||||
to be removed in Python 3.3. Also see the :ref:`deprecated-aliases` section in
|
||||
the :mod:`unittest` documentation.
|
||||
|
||||
(Contributed by Ezio Melotti; :issue:`9424`.)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue