diff options
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r-- | numpy/lib/tests/test__iotools.py | 7 | ||||
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 1 | ||||
-rw-r--r-- | numpy/lib/tests/test_regression.py | 3 | ||||
-rw-r--r-- | numpy/lib/tests/test_type_check.py | 2 |
4 files changed, 4 insertions, 9 deletions
diff --git a/numpy/lib/tests/test__iotools.py b/numpy/lib/tests/test__iotools.py index 1d69d869e..6964c1128 100644 --- a/numpy/lib/tests/test__iotools.py +++ b/numpy/lib/tests/test__iotools.py @@ -9,7 +9,6 @@ from numpy.lib._iotools import ( LineSplitter, NameValidator, StringConverter, has_nested_fields, easy_dtype, flatten_dtype ) -from numpy.compat import unicode class TestLineSplitter: @@ -179,10 +178,10 @@ class TestStringConverter: # note that the longdouble type has been skipped, so the # _status increases by 2. Everything should succeed with # unicode conversion (5). - for s in ['a', u'a', b'a']: + for s in ['a', b'a']: res = converter.upgrade(s) - assert_(type(res) is unicode) - assert_equal(res, u'a') + assert_(type(res) is str) + assert_equal(res, 'a') assert_equal(converter._status, 5 + status_offset) def test_missing(self): diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 3e621f077..23bf3296d 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -21,7 +21,6 @@ from numpy.lib import ( select, setxor1d, sinc, trapz, trim_zeros, unwrap, unique, vectorize ) -from numpy.compat import long def get_mat(n): data = np.arange(n) diff --git a/numpy/lib/tests/test_regression.py b/numpy/lib/tests/test_regression.py index a2598990b..55df2a675 100644 --- a/numpy/lib/tests/test_regression.py +++ b/numpy/lib/tests/test_regression.py @@ -5,7 +5,6 @@ from numpy.testing import ( assert_, assert_equal, assert_array_equal, assert_array_almost_equal, assert_raises, _assert_valid_refcount, ) -from numpy.compat import unicode class TestRegression: @@ -180,7 +179,7 @@ class TestRegression: # related to ticket #1405. include_dirs = [np.get_include()] for path in include_dirs: - assert_(isinstance(path, (str, unicode))) + assert_(isinstance(path, str)) assert_(path != '') def test_polyder_return_type(self): diff --git a/numpy/lib/tests/test_type_check.py b/numpy/lib/tests/test_type_check.py index 47685550a..3f4ca6309 100644 --- a/numpy/lib/tests/test_type_check.py +++ b/numpy/lib/tests/test_type_check.py @@ -1,5 +1,4 @@ import numpy as np -from numpy.compat import long from numpy.testing import ( assert_, assert_equal, assert_array_equal, assert_raises ) @@ -86,7 +85,6 @@ class TestIsscalar: assert_(not np.isscalar([3])) assert_(not np.isscalar((3,))) assert_(np.isscalar(3j)) - assert_(np.isscalar(long(10))) assert_(np.isscalar(4.0)) |