diff options
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r-- | numpy/lib/tests/test_arraypad.py | 5 | ||||
-rw-r--r-- | numpy/lib/tests/test_io.py | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py index d037962e6..056aa4582 100644 --- a/numpy/lib/tests/test_arraypad.py +++ b/numpy/lib/tests/test_arraypad.py @@ -986,10 +986,7 @@ class TestNdarrayPadWidth(TestCase): class TestUnicodeInput(TestCase): def test_unicode_mode(self): - try: - constant_mode = unicode('constant') - except NameError: - constant_mode = 'constant' + constant_mode = u'constant' a = np.pad([1], 2, mode=constant_mode) b = np.array([0, 0, 1, 0, 0]) assert_array_equal(a, b) diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index 83fca5b91..2a494fe08 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -532,7 +532,7 @@ class TestLoadTxt(TestCase): c.write('# comment\n1,2,3,5\n') c.seek(0) x = np.loadtxt(c, dtype=int, delimiter=',', - comments=unicode('#')) + comments=u'#') a = np.array([1, 2, 3, 5], int) assert_array_equal(x, a) |