summaryrefslogtreecommitdiff
path: root/numpy/core/tests
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2018-07-13 23:51:14 -0500
committerGitHub <noreply@github.com>2018-07-13 23:51:14 -0500
commitc8b246cee7d01c45fb80f765b06abff433ff46da (patch)
treecf884d124e9471f2727419c4b2e0ea147658c050 /numpy/core/tests
parentb047f387d2424bd2134db6005190311b15a84ac2 (diff)
parent7c3f590d925e2ff68f2852ef1e3211b5452a8d9f (diff)
downloadnumpy-c8b246cee7d01c45fb80f765b06abff433ff46da.tar.gz
Merge pull request #11382 from mattip/remove-typeNA
DEP: deprecate undocumented, unused dtype type dicts
Diffstat (limited to 'numpy/core/tests')
-rw-r--r--numpy/core/tests/test_deprecations.py7
-rw-r--r--numpy/core/tests/test_regression.py8
2 files changed, 12 insertions, 3 deletions
diff --git a/numpy/core/tests/test_deprecations.py b/numpy/core/tests/test_deprecations.py
index 8eb258666..0e7e9f55a 100644
--- a/numpy/core/tests/test_deprecations.py
+++ b/numpy/core/tests/test_deprecations.py
@@ -504,3 +504,10 @@ class TestGeneratorSum(_DeprecationTestCase):
# 2018-02-25, 1.15.0
def test_generator_sum(self):
self.assert_deprecated(np.sum, args=((i for i in range(5)),))
+
+class TestSctypeNA(_VisibleDeprecationTestCase):
+ # 2018-06-24, 1.16
+ def test_sctypeNA(self):
+ self.assert_deprecated(lambda: np.sctypeNA['?'])
+ self.assert_deprecated(lambda: np.typeNA['?'])
+ self.assert_deprecated(lambda: np.typeNA.get('?'))
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 62f592524..5f4410d54 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -46,9 +46,11 @@ class TestRegression(object):
assert_array_equal(a, b)
def test_typeNA(self):
- # Ticket #31
- assert_equal(np.typeNA[np.int64], 'Int64')
- assert_equal(np.typeNA[np.uint64], 'UInt64')
+ # Issue gh-515
+ with suppress_warnings() as sup:
+ sup.filter(np.VisibleDeprecationWarning)
+ assert_equal(np.typeNA[np.int64], 'Int64')
+ assert_equal(np.typeNA[np.uint64], 'UInt64')
def test_dtype_names(self):
# Ticket #35