Commit 39bac725 authored by Stefan Behnel's avatar Stefan Behnel

Py3 test fixes

--HG--
extra : rebase_source : ea120f4d95e0ea2ee49fa91c6bb2e0534fc53730
parent e7ce04f9
...@@ -521,8 +521,9 @@ def stringtest(String[:] view): ...@@ -521,8 +521,9 @@ def stringtest(String[:] view):
@testcase_numpy_1_5 @testcase_numpy_1_5
def test_string_invalid_dims(): def test_string_invalid_dims():
""" """
>>> def b(s): return s.encode('ascii')
>>> dtype = np.dtype([('a', 'S4')]) >>> dtype = np.dtype([('a', 'S4')])
>>> data = ['spam', 'eggs'] >>> data = [b('spam'), b('eggs')]
>>> stringstructtest(np.array(data, dtype=dtype)) >>> stringstructtest(np.array(data, dtype=dtype))
Traceback (most recent call last): Traceback (most recent call last):
... ...
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment