@@ -809,7 +809,6 @@ Test cases
809809
810810
811811 .. method :: assertEqual(first, second, msg=None)
812- failUnlessEqual(first, second, msg=None)
813812
814813 Test that *first * and *second * are equal. If the values do not compare
815814 equal, the test will fail with the explanation given by *msg *, or
@@ -831,12 +830,8 @@ Test cases
831830 :meth: `assertMultiLineEqual ` added as the default type equality
832831 function for comparing strings.
833832
834- .. deprecated :: 3.1
835- :meth: `failUnlessEqual `; use :meth: `assertEqual `.
836-
837833
838834 .. method :: assertNotEqual(first, second, msg=None)
839- failIfEqual(first, second, msg=None)
840835
841836 Test that *first * and *second * are not equal. If the values do compare
842837 equal, the test will fail with the explanation given by *msg *, or
@@ -845,31 +840,19 @@ Test cases
845840 default value for *msg * can be computed to include representations of both
846841 *first * and *second *.
847842
848- .. deprecated :: 3.1
849- :meth: `failIfEqual `; use :meth: `assertNotEqual `.
850-
851843
852844 .. method :: assertTrue(expr, msg=None)
853- assert_(expr, msg=None)
854- failUnless(expr, msg=None)
855845
856846 Signal a test failure if *expr * is false; the explanation for the failure
857847 will be *msg * if given, otherwise it will be :const: `None `.
858848
859- .. deprecated :: 3.1
860- :meth: `failUnless ` and :meth: `assert_ `; use :meth: `assertTrue `.
861-
862849
863850 .. method :: assertFalse(expr, msg=None)
864- failIf(expr, msg=None)
865851
866852 The inverse of the :meth: `assertTrue ` method is the :meth: `assertFalse ` method.
867853 This signals a test failure if *expr * is true, with *msg * or :const: `None `
868854 for the error message.
869855
870- .. deprecated :: 3.1
871- :meth: `failIf `; use :meth: `assertFalse `.
872-
873856
874857 .. method :: assertIs(first, second, msg=None)
875858 assertIsNot(first, second, msg=None)
@@ -929,9 +912,7 @@ Test cases
929912 +---------------------------------------------------------+--------------------------------------+------------+
930913
931914 .. method :: assertRaises(exception, callable, *args, **kwds)
932- failUnlessRaises(exception, callable, *args, **kwds)
933915 assertRaises(exception)
934- failUnlessRaises(exception)
935916
936917 Test that an exception is raised when *callable * is called with any
937918 positional or keyword arguments that are also passed to
@@ -962,9 +943,6 @@ Test cases
962943 .. versionchanged :: 3.2
963944 Added the :attr: `exception ` attribute.
964945
965- .. deprecated :: 3.1
966- :meth: `failUnlessRaises `; use :meth: `assertRaises `.
967-
968946
969947 .. method :: assertRaisesRegexp(exception, regexp, callable, *args, **kwds)
970948 assertRaisesRegexp(exception, regexp)
@@ -1079,7 +1057,6 @@ Test cases
10791057
10801058
10811059 .. method :: assertAlmostEqual(first, second, places=7, msg=None, delta=None)
1082- failUnlessAlmostEqual(first, second, places=7, msg=None, delta=None)
10831060
10841061 Test that *first * and *second * are approximately equal by computing the
10851062 difference, rounding to the given number of decimal *places * (default 7),
@@ -1099,12 +1076,8 @@ Test cases
10991076 Objects that compare equal are automatically almost equal.
11001077 Added the ``delta `` keyword argument.
11011078
1102- .. deprecated :: 3.1
1103- :meth: `failUnlessAlmostEqual `; use :meth: `assertAlmostEqual `.
1104-
11051079
11061080 .. method :: assertNotAlmostEqual(first, second, places=7, msg=None, delta=None)
1107- failIfAlmostEqual(first, second, places=7, msg=None, delta=None)
11081081
11091082 Test that *first * and *second * are not approximately equal by computing
11101083 the difference, rounding to the given number of decimal *places * (default
@@ -1124,9 +1097,6 @@ Test cases
11241097 Objects that compare equal automatically fail. Added the ``delta ``
11251098 keyword argument.
11261099
1127- .. deprecated :: 3.1
1128- :meth: `failIfAlmostEqual `; use :meth: `assertNotAlmostEqual `.
1129-
11301100
11311101 .. method :: assertGreater(first, second, msg=None)
11321102 assertGreaterEqual(first, second, msg=None)
@@ -1452,6 +1422,30 @@ Test cases
14521422 :mod: `unittest `-based test framework.
14531423
14541424
1425+ Deprecated aliases
1426+ ##################
1427+
1428+ For historical reasons, some of the :class: `TestCase ` methods had one or more
1429+ aliases that are now deprecated. The following table lists the correct names
1430+ along with their deprecated aliases:
1431+
1432+ ============================== ===============================
1433+ Method Name Deprecated alias(es)
1434+ ============================== ===============================
1435+ :meth: `.assertEqual ` failUnlessEqual, assertEquals
1436+ :meth: `.assertNotEqual ` failIfEqual
1437+ :meth: `.assertTrue ` failUnless, assert\_
1438+ :meth: `.assertFalse ` failIf
1439+ :meth: `.assertRaises ` failUnlessRaises
1440+ :meth: `.assertAlmostEqual ` failUnlessAlmostEqual
1441+ :meth: `.assertNotAlmostEqual ` failIfAlmostEqual
1442+ ============================== ===============================
1443+
1444+ .. deprecated :: 3.1
1445+ the aliases listed in the second column
1446+
1447+
1448+
14551449.. _testsuite-objects :
14561450
14571451Grouping tests
0 commit comments