diff options
author | Ralf Gommers <ralf.gommers@gmail.com> | 2018-07-13 23:51:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-13 23:51:14 -0500 |
commit | c8b246cee7d01c45fb80f765b06abff433ff46da (patch) | |
tree | cf884d124e9471f2727419c4b2e0ea147658c050 /numpy/core/tests | |
parent | b047f387d2424bd2134db6005190311b15a84ac2 (diff) | |
parent | 7c3f590d925e2ff68f2852ef1e3211b5452a8d9f (diff) | |
download | numpy-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.py | 7 | ||||
-rw-r--r-- | numpy/core/tests/test_regression.py | 8 |
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 |