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

benjamin.peterson python-checkins at python.org
Sun Mar 29 05:31:40 CEST 2009


Author: benjamin.peterson
Date: Sun Mar 29 05:31:40 2009
New Revision: 70669

Log:
stop the versionchanged directive from hiding the docs

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	Sun Mar 29 05:31:40 2009
@@ -672,13 +672,15 @@
       To catch any of a group of exceptions, a tuple containing the exception
       classes may be passed as *exception*.
 
-      .. versionchanged:: 2.7
+      If *callable* is omitted or None, returns a context manager so that the
+      code under test can be written inline rather than as a function::
+
+         with self.failUnlessRaises(some_error_class):
+             do_something()
 
-         If *callable* is omitted or None, returns a context manager so that the
-         code under test can be written inline rather than as a function::
+      .. versionchanged:: 2.7
+         Added the ability to use :meth:`assertRaises` as a context manager.
 
-           with self.failUnlessRaises(some_error_class):
-               do_something()
 
    .. method:: failIf(expr[, msg])
                assertFalse(expr[, msg])


More information about the Python-checkins mailing list