summaryrefslogtreecommitdiff
path: root/numpy/ma
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-05-07 09:40:15 -0600
committerGitHub <noreply@github.com>2017-05-07 09:40:15 -0600
commit39aaa2d2960e2e4bfb6d13b0f1a169deebf611e2 (patch)
tree046cc746d703551e105a6d0ea80f3740270df55b /numpy/ma
parent25a6dfbbebb1d92e0e402aed7c8f11e4f5d3bc5b (diff)
parent868aa751ceb229465d626a7fd7083544afc96ed2 (diff)
downloadnumpy-39aaa2d2960e2e4bfb6d13b0f1a169deebf611e2.tar.gz
Merge pull request #8421 from seberg/isnat
ENH: Add isnat function and make comparison tests NAT specific
Diffstat (limited to 'numpy/ma')
-rw-r--r--numpy/ma/tests/test_core.py4
-rw-r--r--numpy/ma/testutils.py8
2 files changed, 5 insertions, 7 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
index e72088692..d37a561c2 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 \