Skip to content

Commit c7f38bb

Browse files
Update versions (#92557)
This reverts commit b50322d.
1 parent 17b4291 commit c7f38bb

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

Doc/library/unittest.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@ Loading and running tests
18081808
.. versionchanged:: 3.5
18091809
Support for a keyword-only argument *pattern* has been added.
18101810

1811-
.. versionchanged:: 3.11
1811+
.. versionchanged:: 3.12
18121812
The undocumented and unofficial *use_load_tests* parameter has been
18131813
removed.
18141814

Doc/whatsnew/3.12.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,27 @@ Deprecated
107107
Removed
108108
=======
109109

110+
* Removed many old deprecated :mod:`unittest` features:
111+
112+
- :class:`~unittest.TestCase` method aliases ``failUnlessEqual``,
113+
``failIfEqual``, ``failUnless``, ``failIf``, ``failUnlessRaises``,
114+
``failUnlessAlmostEqual``, ``failIfAlmostEqual`` (deprecated in Python 3.1),
115+
``assertEquals``, ``assertNotEquals``, ``assert_``, ``assertAlmostEquals``,
116+
``assertNotAlmostEquals``, ``assertRegexpMatches``, ``assertRaisesRegexp``
117+
(deprecated in Python 3.2), and ``assertNotRegexpMatches`` (deprecated in
118+
Python 3.5).
119+
120+
- Undocumented and broken :class:`~unittest.TestCase` method
121+
``assertDictContainsSubset`` (deprecated in Python 3.2).
122+
123+
- Undocumented :meth:`<unittest.TestLoader.loadTestsFromModule>
124+
TestLoader.loadTestsFromModule` parameter *use_load_tests* (deprecated
125+
and ignored since Python 3.2).
126+
127+
- An alias of the :class:`~unittest.TextTestResult` class:
128+
``_TextTestResult`` (deprecated in Python 3.2).
129+
130+
(Contributed by Serhiy Storchaka in :issue:`89325`.)
110131

111132

112133
Porting to Python 3.12

Lib/unittest/test/test_case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,7 @@ def testAssertNoLogsYieldsNone(self):
17611761
self.assertIsNone(value)
17621762

17631763
def testDeprecatedFailMethods(self):
1764-
"""Test that the deprecated fail* methods get removed in 3.11"""
1764+
"""Test that the deprecated fail* methods get removed in 3.12"""
17651765
deprecated_names = [
17661766
'failIfEqual', 'failUnlessEqual', 'failUnlessAlmostEqual',
17671767
'failIfAlmostEqual', 'failUnless', 'failUnlessRaises', 'failIf',

Lib/unittest/test/test_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def load_tests(loader, tests, pattern):
176176
self.assertIsInstance(suite, unittest.TestSuite)
177177
self.assertEqual(load_tests_args, [loader, suite, None])
178178

179-
# In Python 3.11, the undocumented and unofficial use_load_tests has
179+
# In Python 3.12, the undocumented and unofficial use_load_tests has
180180
# been removed.
181181
with self.assertRaises(TypeError):
182182
loader.loadTestsFromModule(m, False)

0 commit comments

Comments
 (0)