summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2011-02-11 08:12:44 -0700
committerCharles Harris <charlesr.harris@gmail.com>2011-02-11 08:12:44 -0700
commitdf5714798e5e8448928286567b018ba447ec0b6c (patch)
treeb3e4fafea236e167a3412cf315e6a58399346637 /numpy
parentf30000bd09a4886f6d5dd9e1cb0ab437dc6c3f2f (diff)
downloadnumpy-df5714798e5e8448928286567b018ba447ec0b6c.tar.gz
BUG: ticket 1741, fix python 2.5 incompatibilityr.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_regression.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 4ddbbd630..3dd7e88d6 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -1521,11 +1521,13 @@ class TestRegression(TestCase):
def test_setting_rank0_string(self):
"Ticket #1736"
+ s1 = asbytes("hello1")
+ s2 = asbytes("hello2")
a = np.zeros((), dtype="S10")
- a[()] = b"hello1"
- assert_equal(a, np.array(b"hello1"))
- a[()] = np.array(b"hello2")
- assert_equal(a, np.array(b"hello2"))
+ a[()] = s1
+ assert_equal(a, np.array(s1))
+ a[()] = np.array(s2)
+ assert_equal(a, np.array(s2))
a = np.zeros((), dtype='f4')
a[()] = 3