summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-02-24 21:05:57 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-02-24 21:05:57 (GMT)
commit56f3c306c213ecf5f8f64b3b2291fe2c066f7112 (patch)
treefd03f391620dbf4bfbe3445ce4fd7a65ea3be607 /Doc
parent4e4a3134864de2081a62a7a5c0ac765de472a2e5 (diff)
downloadcpython-56f3c306c213ecf5f8f64b3b2291fe2c066f7112.zip
cpython-56f3c306c213ecf5f8f64b3b2291fe2c066f7112.tar.gz
cpython-56f3c306c213ecf5f8f64b3b2291fe2c066f7112.tar.bz2
whatsnew: unittest.TestCase.assertLogs.
Also fix issue number in address sanity check entry.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/3.4.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index c0b7539..3a2f61c 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -1311,6 +1311,15 @@ behavior by creating a :class:`~unittest.TestSuite` subclass that defines a
custom ``_removeTestAtIndex`` method. (Contributed by Tom Wardill, Matt
McClure, and Andrew Svetlov in :issue:`11798`.)
+A new test assertion context-manager, :meth:`~unittest.TestCase.assertLogs`,
+will ensure that a given block of code emits a log message using the
+:mod:`logging` module. By default the message can come from any logger and
+have a priority of ``INFO`` or higher, but both the logger name and an
+alternative minimum logging level may be specified. The object returned by the
+context manager can be queried for the :class:`~logging.LogRecord`\ s and/or
+formatted messages that were logged. (Contributed by Antoine Pitrou in
+:issue:`18937`.)
+
venv
----
@@ -1487,7 +1496,7 @@ Other Build and C API Changes
* The CPython source can now be compiled using the address sanity checking
features of recent versions of GCC and clang: the false alarms in the small
object allocator have been silenced. (Contributed by Dhiru Kholia in
- :issue:`18598`.)
+ :issue:`18596`.)
.. _other-improvements-3.4: