Commit 65d083d1 authored by smutch's avatar smutch Committed by Stefan Behnel

Use platform dependent test for "unpacked_struct_with_arrays" (GH-3621)

parent 4ca10b5f
from __future__ import unicode_literals from __future__ import unicode_literals
import struct
# Tests buffer format string parsing. # Tests buffer format string parsing.
...@@ -442,7 +443,10 @@ def packed_struct_with_arrays(fmt): ...@@ -442,7 +443,10 @@ def packed_struct_with_arrays(fmt):
@testcase @testcase
def unpacked_struct_with_arrays(fmt): def unpacked_struct_with_arrays(fmt):
""" """
>>> unpacked_struct_with_arrays("T{i:a:(8)f:b:f:c:Q:d:(5)i:e:i:f:i:g:xxxx(4)d:h:i:i:}") >>> if struct.calcsize('P') == 8: # 64 bit
... unpacked_struct_with_arrays("T{i:a:(8)f:b:f:c:Q:d:(5)i:e:i:f:i:g:xxxx(4)d:h:i:i:}")
... elif struct.calcsize('P') == 4: # 32 bit
... unpacked_struct_with_arrays("T{i:a:(8)f:b:f:c:Q:d:(5)i:e:i:f:i:g:(4)d:h:i:i:}")
""" """
cdef object[UnpackedStructWithArrays] buf = MockBuffer( cdef object[UnpackedStructWithArrays] buf = MockBuffer(
......
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