summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2016-06-19 13:12:54 +0200
committerSebastian Berg <sebastian@sipsolutions.net>2016-09-02 10:10:55 +0200
commit968507bdfb4467d5ec6e3b6999a5717100782c3c (patch)
treeb79fa7fbb18064f56a0605e6436a91342fb8be7c /doc
parent29a45efa15cf3992ab01b1535d51189319a7592d (diff)
downloadnumpy-968507bdfb4467d5ec6e3b6999a5717100782c3c.tar.gz
ENH: Make warning testing context managers more specific
This means that warnings of different origin then the one tested for behave normally. If the normal behaviour is to igonre them this might decrease specificity in rare cases. In most cases the specificity will be slightly higher.
Diffstat (limited to 'doc')
-rw-r--r--doc/release/1.12.0-notes.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/release/1.12.0-notes.rst b/doc/release/1.12.0-notes.rst
index 9a9a50aa8..7b315b90b 100644
--- a/doc/release/1.12.0-notes.rst
+++ b/doc/release/1.12.0-notes.rst
@@ -112,6 +112,18 @@ change in implementation some very delicate tests may fail that did not
fail before.
+``assert_warns`` and ``deprecated`` decorator more specific
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The ``assert_warns`` function and context manager are now more specific
+to the given warning category. This increased specificity leads to them
+being handled according to the outer warning settings. This means that
+no warning may be raised in cases where a wrong category warning is given
+and ignored outside the context. Alternatively the increased specificity
+may mean that warnings that were incorrectly ignored will now be shown
+or raised. See also the new ``suppress_warnings`` context manager.
+The same is true for the ``deprecated`` decorator.
+
+
C API
~~~~~