summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorandrei kulakov <andrei.avk@gmail.com>2021-08-22 18:32:45 (GMT)
committerGitHub <noreply@github.com>2021-08-22 18:32:45 (GMT)
commitb1db308c6114bb18c06656c94c0ffa73ba954977 (patch)
treec69da403a5693c670028754c8a8d3af69e9e24b6 /Doc
parent6dd1cdb0cfd6427925863e0ff7ad3fde0d824a8b (diff)
downloadcpython-b1db308c6114bb18c06656c94c0ffa73ba954977.zip
cpython-b1db308c6114bb18c06656c94c0ffa73ba954977.tar.gz
cpython-b1db308c6114bb18c06656c94c0ffa73ba954977.tar.bz2
bpo-41322: Add unit tests for deprecation of test return values (GH-27846)
Also fix the traceback of warnings.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/unittest.rst4
-rw-r--r--Doc/whatsnew/3.11.rst4
2 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 99c2f6e..f0fba94 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -151,6 +151,10 @@ The above examples show the most commonly used :mod:`unittest` features which
are sufficient to meet many everyday testing needs. The remainder of the
documentation explores the full feature set from first principles.
+.. versionchanged:: 3.11
+ The behavior of returning a value from a test method (other than the default
+ ``None`` value), is now deprecated.
+
.. _unittest-command-line-interface:
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 49b4364..cb8f84c 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -395,3 +395,7 @@ Removed
:func:`~gettext.install` are also removed, since they are only used for
the ``l*gettext()`` functions.
(Contributed by Dong-hee Na and Serhiy Storchaka in :issue:`44235`.)
+
+* The behavior of returning a value from a :class:`~unittest.TestCase` and
+ :class:`~unittest.IsolatedAsyncioTestCase` test methods (other than the default ``None``
+ value), is now deprecated.