[Python-checkins] r78018 - python/trunk/Doc/library/unittest.rst

georg.brandl python-checkins at python.org
Sat Feb 6 11:08:22 CET 2010


Author: georg.brandl
Date: Sat Feb  6 11:08:21 2010
New Revision: 78018

Log:
#7864: make deprecation notices a bit clearer.

Modified:
   python/trunk/Doc/library/unittest.rst

Modified: python/trunk/Doc/library/unittest.rst
==============================================================================
--- python/trunk/Doc/library/unittest.rst	(original)
+++ python/trunk/Doc/library/unittest.rst	Sat Feb  6 11:08:21 2010
@@ -681,7 +681,7 @@
       will be *msg* if given, otherwise it will be :const:`None`.
 
       .. deprecated:: 2.7
-         :meth:`failUnless`.
+         :meth:`failUnless`; use one of the ``assert`` variants.
 
 
    .. method:: assertEqual(first, second[, msg])
@@ -703,7 +703,7 @@
          Added the automatic calling of type specific equality function.
 
       .. deprecated:: 2.7
-         :meth:`failUnlessEqual`.
+         :meth:`failUnlessEqual`; use :meth:`assertEqual`.
 
 
    .. method:: assertNotEqual(first, second[, msg])
@@ -717,7 +717,7 @@
       *first* and *second*.
 
       .. deprecated:: 2.7
-         :meth:`failIfEqual`.
+         :meth:`failIfEqual`; use :meth:`assertNotEqual`.
 
 
    .. method:: assertAlmostEqual(first, second[, places[, msg]])
@@ -736,7 +736,7 @@
          Objects that compare equal are automatically almost equal.
 
       .. deprecated:: 2.7
-         :meth:`failUnlessAlmostEqual`.
+         :meth:`failUnlessAlmostEqual`; use :meth:`assertAlmostEqual`.
 
 
    .. method:: assertNotAlmostEqual(first, second[, places[, msg]])
@@ -755,7 +755,7 @@
          Objects that compare equal automatically fail.
 
       .. deprecated:: 2.7
-         :meth:`failIfAlmostEqual`.
+         :meth:`failIfAlmostEqual`; use :meth:`assertNotAlmostEqual`.
 
 
    .. method:: assertGreater(first, second, msg=None)
@@ -911,7 +911,7 @@
          Added the ability to use :meth:`assertRaises` as a context manager.
 
       .. deprecated:: 2.7
-         :meth:`failUnlessRaises`.
+         :meth:`failUnlessRaises`; use :meth:`assertRaises`.
 
 
    .. method:: assertRaisesRegexp(exception, regexp[, callable, ...])
@@ -988,7 +988,7 @@
       for the error message.
 
       .. deprecated:: 2.7
-         :meth:`failIf`.
+         :meth:`failIf`; use :meth:`assertFalse`.
 
 
    .. method:: fail([msg])


More information about the Python-checkins mailing list