]> granicus.if.org Git - python/commitdiff
Address Terry's comments
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 15 Sep 2013 00:01:39 +0000 (02:01 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 15 Sep 2013 00:01:39 +0000 (02:01 +0200)
Doc/library/unittest.rst

index 380f0581350f820d56a995a7cdb1752198339f80..c13f9ca3d6f979a58aa755fbc970e24857eb1d56 100644 (file)
@@ -883,8 +883,8 @@ Test cases
 
 
 
-   It is also possible to check that exceptions and warnings are raised using
-   the following methods:
+   It is also possible to check the production of exceptions, warnings and
+   log messages using the following methods:
 
    +---------------------------------------------------------+--------------------------------------+------------+
    | Method                                                  | Checks that                          | New in     |
@@ -901,6 +901,9 @@ Test cases
    | :meth:`assertWarnsRegex(warn, r, fun, *args, **kwds)    | ``fun(*args, **kwds)`` raises *warn* | 3.2        |
    | <TestCase.assertWarnsRegex>`                            | and the message matches regex *r*    |            |
    +---------------------------------------------------------+--------------------------------------+------------+
+   | :meth:`assertLogs(logger, level)`                       | The ``with`` block logs on *logger*  | 3.4        |
+   | <TestCase.assertWarns>`                                 | with minimum *level*                 |            |
+   +---------------------------------------------------------+--------------------------------------+------------+
 
    .. method:: assertRaises(exception, callable, *args, **kwds)
                assertRaises(exception, msg=None)