Skip to content

Commit 74921ed

Browse files
DimitrisJimMariatta
authored andcommitted
bpo-30335: Add deprecation alias entry for assertNotRegexpMatches (GH-1536)
Document that assertNotRegexpMatches is a deprecated alias for assertNotRegex.
1 parent fbfaa6f commit 74921ed

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Doc/library/unittest.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,9 @@ Test cases
11701170
:meth:`.assertRegex`.
11711171
.. versionadded:: 3.2
11721172
:meth:`.assertNotRegex`.
1173+
.. versionadded:: 3.5
1174+
The name ``assertNotRegexpMatches`` is a deprecated alias
1175+
for :meth:`.assertNotRegex`.
11731176

11741177

11751178
.. method:: assertCountEqual(first, second, msg=None)
@@ -1435,9 +1438,9 @@ For historical reasons, some of the :class:`TestCase` methods had one or more
14351438
aliases that are now deprecated. The following table lists the correct names
14361439
along with their deprecated aliases:
14371440

1438-
============================== ====================== ======================
1441+
============================== ====================== =======================
14391442
Method Name Deprecated alias Deprecated alias
1440-
============================== ====================== ======================
1443+
============================== ====================== =======================
14411444
:meth:`.assertEqual` failUnlessEqual assertEquals
14421445
:meth:`.assertNotEqual` failIfEqual assertNotEquals
14431446
:meth:`.assertTrue` failUnless assert\_
@@ -1446,17 +1449,19 @@ along with their deprecated aliases:
14461449
:meth:`.assertAlmostEqual` failUnlessAlmostEqual assertAlmostEquals
14471450
:meth:`.assertNotAlmostEqual` failIfAlmostEqual assertNotAlmostEquals
14481451
:meth:`.assertRegex` assertRegexpMatches
1452+
:meth:`.assertNotRegex` assertNotRegexpMatches
14491453
:meth:`.assertRaisesRegex` assertRaisesRegexp
1450-
============================== ====================== ======================
1454+
============================== ====================== =======================
14511455

14521456
.. deprecated:: 3.1
14531457
the fail* aliases listed in the second column.
14541458
.. deprecated:: 3.2
14551459
the assert* aliases listed in the third column.
14561460
.. deprecated:: 3.2
14571461
``assertRegexpMatches`` and ``assertRaisesRegexp`` have been renamed to
1458-
:meth:`.assertRegex` and :meth:`.assertRaisesRegex`
1459-
1462+
:meth:`.assertRegex` and :meth:`.assertRaisesRegex`.
1463+
.. deprecated:: 3.5
1464+
the ``assertNotRegexpMatches`` name in favor of :meth:`.assertNotRegex`.
14601465

14611466
.. _testsuite-objects:
14621467

0 commit comments

Comments
 (0)