Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update versions (#92557)
This reverts commit b50322d.
  • Loading branch information
serhiy-storchaka authored May 9, 2022
commit c7f38bb66a333a71acadca758dbcdbb03d418943
2 changes: 1 addition & 1 deletion Doc/library/unittest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,7 @@ Loading and running tests
.. versionchanged:: 3.5
Support for a keyword-only argument *pattern* has been added.

.. versionchanged:: 3.11
.. versionchanged:: 3.12
The undocumented and unofficial *use_load_tests* parameter has been
removed.

Expand Down
21 changes: 21 additions & 0 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,27 @@ Deprecated
Removed
=======

* Removed many old deprecated :mod:`unittest` features:
Comment thread
serhiy-storchaka marked this conversation as resolved.

- :class:`~unittest.TestCase` method aliases ``failUnlessEqual``,
Comment thread
serhiy-storchaka marked this conversation as resolved.
Outdated
``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).
Comment thread
serhiy-storchaka marked this conversation as resolved.
Outdated

- 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:`89325`.)
Comment thread
serhiy-storchaka marked this conversation as resolved.
Outdated


Porting to Python 3.12
Expand Down
2 changes: 1 addition & 1 deletion Lib/unittest/test/test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ def testAssertNoLogsYieldsNone(self):
self.assertIsNone(value)

def testDeprecatedFailMethods(self):
"""Test that the deprecated fail* methods get removed in 3.11"""
"""Test that the deprecated fail* methods get removed in 3.12"""
deprecated_names = [
'failIfEqual', 'failUnlessEqual', 'failUnlessAlmostEqual',
'failIfAlmostEqual', 'failUnless', 'failUnlessRaises', 'failIf',
Expand Down
2 changes: 1 addition & 1 deletion Lib/unittest/test/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def load_tests(loader, tests, pattern):
self.assertIsInstance(suite, unittest.TestSuite)
self.assertEqual(load_tests_args, [loader, suite, None])

# In Python 3.11, the undocumented and unofficial use_load_tests has
# In Python 3.12, the undocumented and unofficial use_load_tests has
# been removed.
with self.assertRaises(TypeError):
loader.loadTestsFromModule(m, False)
Expand Down