diff options
author | Richard Plangger <planrichi@gmail.com> | 2020-02-20 15:16:57 -0300 |
---|---|---|
committer | Richard Plangger <planrichi@gmail.com> | 2020-02-20 15:16:57 -0300 |
commit | dd9030583213137223805655beadffaf7eac4999 (patch) | |
tree | 699814635e86096e8fa4f23f18945206a914f001 /extra_tests | |
parent | add python3.6 constants, they will be exposed to pypy2.7 as well. (diff) | |
download | pypy-dd9030583213137223805655beadffaf7eac4999.tar.gz pypy-dd9030583213137223805655beadffaf7eac4999.tar.bz2 pypy-dd9030583213137223805655beadffaf7eac4999.zip |
byteorder related issue, check the byte order of that machine
Diffstat (limited to 'extra_tests')
-rw-r--r-- | extra_tests/ctypes_tests/test_structures.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/extra_tests/ctypes_tests/test_structures.py b/extra_tests/ctypes_tests/test_structures.py index b6bd075942..fa6ed900ae 100644 --- a/extra_tests/ctypes_tests/test_structures.py +++ b/extra_tests/ctypes_tests/test_structures.py @@ -1,6 +1,7 @@ from ctypes import * import pytest +import sys def test_subclass_initializer(): @@ -207,6 +208,9 @@ def test_memoryview(): ) mv = memoryview(c_array) - assert mv.format == 'T{<h:a:<h:b:}' + if sys.byteorder == 'little': + assert mv.format == 'T{<h:a:<h:b:}' + else: + assert mv.format == 'T{>h:a:>h:b:}' assert mv.shape == (2, 3) assert mv.itemsize == 4 |