]> granicus.if.org Git - python/commitdiff
stop the versionchanged directive from hiding the docs
authorBenjamin Peterson <benjamin@python.org>
Sun, 29 Mar 2009 03:31:40 +0000 (03:31 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 29 Mar 2009 03:31:40 +0000 (03:31 +0000)
Doc/library/unittest.rst

index 0aa55a6c41fc891112873d024cb9d4e1b09cb90d..fb5bb86c295110f575def3f1024a7423ce478569 100644 (file)
@@ -672,13 +672,15 @@ Test cases
       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])