summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test__iotools.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2020-03-26 17:50:20 +0000
committerGitHub <noreply@github.com>2020-03-26 12:50:20 -0500
commit1c58504eec43f9ba18ac835131fed496fb59772d (patch)
tree4ffc786c9cdac81887680aa999ae6dcbd4bd407d /numpy/lib/tests/test__iotools.py
parent5ff70eb0fd61a39207d5166479507e1b099cb707 (diff)
downloadnumpy-1c58504eec43f9ba18ac835131fed496fb59772d.tar.gz
MAINT: simplify code that assumes str/unicode and int/long are different types (#15816)
Cleanup from the dropping of python 2
Diffstat (limited to 'numpy/lib/tests/test__iotools.py')
-rw-r--r--numpy/lib/tests/test__iotools.py7
1 files changed, 3 insertions, 4 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):