diff options
-rw-r--r-- | numpy/ma/tests/test_core.py | 4 | ||||
-rw-r--r-- | numpy/ma/testutils.py | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py index f807fc8ae..b8cb8f1a4 100644 --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -1841,11 +1841,11 @@ class TestFillingValues(TestCase): "h", "D", "W", "M", "Y"): control = numpy.datetime64("NaT", timecode) test = default_fill_value(numpy.dtype("<M8[" + timecode + "]")) - assert_equal(test, control) + np.testing.utils.assert_equal(test, control) control = numpy.timedelta64("NaT", timecode) test = default_fill_value(numpy.dtype("<m8[" + timecode + "]")) - assert_equal(test, control) + np.testing.utils.assert_equal(test, control) def test_extremum_fill_value(self): # Tests extremum fill values for flexible type. diff --git a/numpy/ma/testutils.py b/numpy/ma/testutils.py index 866316c62..c19066d71 100644 --- a/numpy/ma/testutils.py +++ b/numpy/ma/testutils.py @@ -14,7 +14,7 @@ from numpy import ndarray, float_ import numpy.core.umath as umath from numpy.testing import ( TestCase, assert_, assert_allclose, assert_array_almost_equal_nulp, - assert_raises, build_err_msg, run_module_suite, suppress_warnings + assert_raises, build_err_msg, run_module_suite ) import numpy.testing.utils as utils from .core import mask_or, getmask, masked_array, nomask, masked, filled @@ -126,10 +126,8 @@ def assert_equal(actual, desired, err_msg=''): return _assert_equal_on_sequences(actual, desired, err_msg='') if not (isinstance(actual, ndarray) or isinstance(desired, ndarray)): msg = build_err_msg([actual, desired], err_msg,) - with suppress_warnings() as sup: - sup.filter(FutureWarning, ".*NAT ==") - if not desired == actual: - raise AssertionError(msg) + if not desired == actual: + raise AssertionError(msg) return # Case #4. arrays or equivalent if ((actual is masked) and not (desired is masked)) or \ |