From: Antoine Pitrou Date: Sun, 15 Sep 2013 00:01:39 +0000 (+0200) Subject: Address Terry's comments X-Git-Tag: v3.4.0a3~64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c89ae206e6fc7dc08c789f9f9db7094f6723419;p=python Address Terry's comments --- diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 380f058135..c13f9ca3d6 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -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 | | ` | and the message matches regex *r* | | +---------------------------------------------------------+--------------------------------------+------------+ + | :meth:`assertLogs(logger, level)` | The ``with`` block logs on *logger* | 3.4 | + | ` | with minimum *level* | | + +---------------------------------------------------------+--------------------------------------+------------+ .. method:: assertRaises(exception, callable, *args, **kwds) assertRaises(exception, msg=None)