diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-09-02 09:11:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-02 09:11:59 -0500 |
commit | 9164f23c19c049e28d4d4825a53bbb01aedabcfc (patch) | |
tree | f017b7eb7565690a755263df12c835d61e89a8a4 /numpy/ma/tests/test_regression.py | |
parent | 8eedd3e911b7e3f5f35961871ddb8ee1559d4225 (diff) | |
parent | 514d13679a55a82a96689679002c4ddc514641ce (diff) | |
download | numpy-9164f23c19c049e28d4d4825a53bbb01aedabcfc.tar.gz |
Merge pull request #7099 from seberg/suppressed_warnings
Suppressed warnings
Diffstat (limited to 'numpy/ma/tests/test_regression.py')
-rw-r--r-- | numpy/ma/tests/test_regression.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/ma/tests/test_regression.py b/numpy/ma/tests/test_regression.py index dba74d357..fc6cdfaff 100644 --- a/numpy/ma/tests/test_regression.py +++ b/numpy/ma/tests/test_regression.py @@ -4,7 +4,8 @@ import warnings import numpy as np from numpy.testing import (assert_, TestCase, assert_array_equal, - assert_allclose, run_module_suite) + assert_allclose, run_module_suite, + suppress_warnings) from numpy.compat import sixu rlevel = 1 @@ -69,8 +70,9 @@ class TestRegression(TestCase): # See gh-3336 x = np.ma.masked_equal([1, 2, 3, 4, 5], 4) y = np.array([2, 2.5, 3.1, 3, 5]) - with warnings.catch_warnings(): - warnings.simplefilter("ignore") + # this test can be removed after deprecation. + with suppress_warnings() as sup: + sup.filter(DeprecationWarning, "bias and ddof have no effect") r0 = np.ma.corrcoef(x, y, ddof=0) r1 = np.ma.corrcoef(x, y, ddof=1) # ddof should not have an effect (it gets cancelled out) |