summaryrefslogtreecommitdiff
path: root/numpy/testing/nosetester.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2015-07-08 16:31:35 -0500
committerSebastian Berg <sebastian@sipsolutions.net>2015-07-08 16:31:35 -0500
commit64430fa20a7c6c97f906efded23c8c6e057c98e7 (patch)
tree9de77c1c5d86ee8bc914a71a333d32d8bae6491b /numpy/testing/nosetester.py
parentb1a7d4c1d0e18913081ba2c1f8508da57582727e (diff)
downloadnumpy-64430fa20a7c6c97f906efded23c8c6e057c98e7.tar.gz
TST: Make default for all warnings "always"
This should make it easier in some cases, since a warning caught in some test (but not important/not causing failure), will not shadow later tests. In principle the best thing is probably to always check the number of warnings raised, so that you notice when a new warning shows up in a test, though there may be other corner cases here.
Diffstat (limited to 'numpy/testing/nosetester.py')
-rw-r--r--numpy/testing/nosetester.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py
index b920399eb..5c66e497e 100644
--- a/numpy/testing/nosetester.py
+++ b/numpy/testing/nosetester.py
@@ -409,9 +409,9 @@ class NoseTester(object):
# Reset the warning filters to the default state,
# so that running the tests is more repeatable.
warnings.resetwarnings()
- # If deprecation warnings are not set to 'error' below,
- # at least set them to 'warn'.
- warnings.filterwarnings('always', category=DeprecationWarning)
+ # Set all warnings to 'warn', this is because the default 'once'
+ # has the bad property of possibly shadowing later warnings.
+ warnings.filterwarnings('always')
# Force the requested warnings to raise
for warningtype in raise_warnings:
warnings.filterwarnings('error', category=warningtype)