summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_twodim_base.py
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-02-21 02:49:04 +0000
committerPauli Virtanen <pav@iki.fi>2010-02-21 02:49:04 +0000
commit700147f601a881d756128e5e4d9aeb3a356cb7b2 (patch)
tree555026564bf65331c6173b161c4fbbf0530ae6bb /numpy/lib/tests/test_twodim_base.py
parent37f85303d48f7c4724da078563ceb2c6051ffc3a (diff)
downloadnumpy-700147f601a881d756128e5e4d9aeb3a356cb7b2.tar.gz
3K: lib: fix bytes vs str issues in tests
Diffstat (limited to 'numpy/lib/tests/test_twodim_base.py')
-rw-r--r--numpy/lib/tests/test_twodim_base.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_twodim_base.py b/numpy/lib/tests/test_twodim_base.py
index 7d580a1b6..11e4ece6c 100644
--- a/numpy/lib/tests/test_twodim_base.py
+++ b/numpy/lib/tests/test_twodim_base.py
@@ -9,6 +9,7 @@ from numpy import ( arange, rot90, add, fliplr, flipud, zeros, ones, eye,
triu_indices_from, tril_indices, tril_indices_from )
import numpy as np
+from numpy.compat import asbytes, asbytes_nested
def get_mat(n):
data = arange(n)
@@ -65,7 +66,8 @@ class TestEye(TestCase):
assert_equal(eye(3, 2, -3), [[0, 0], [0, 0], [0, 0]])
def test_strings(self):
- assert_equal(eye(2, 2, dtype='S3'), [['1', ''], ['', '1']])
+ assert_equal(eye(2, 2, dtype='S3'),
+ asbytes_nested([['1', ''], ['', '1']]))
def test_bool(self):
assert_equal(eye(2, 2, dtype=bool), [[True, False], [False, True]])