Commit 07c422a5 authored by Stefan Behnel's avatar Stefan Behnel

simplify comparison in test

parent 813c4557
...@@ -1665,7 +1665,7 @@ cdef test_structs_with_arr(FusedStruct array[10]): ...@@ -1665,7 +1665,7 @@ cdef test_structs_with_arr(FusedStruct array[10]):
for j in range(3): for j in range(3):
myslice1[i].chars[j] = 97 + j myslice1[i].chars[j] = 97 + j
if sys.version_info[:2] >= (2, 7) and sys.version_info[:2] < (3, 3): if (2, 7) <= sys.version_info[:2] < (3, 3):
size1 = <Py_ssize_t>sizeof(FusedStruct) size1 = <Py_ssize_t>sizeof(FusedStruct)
size2 = len(builtins.memoryview(myslice1)[0]) size2 = len(builtins.memoryview(myslice1)[0])
assert size1 == size2, (size1, size2, builtins.memoryview(myslice1).format) assert size1 == size2, (size1, size2, builtins.memoryview(myslice1).format)
......
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