summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/bytes_construct_endian.py
blob: 294c5f23f5cff61faa39fd186befba49603c0962 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# test construction of bytes from different objects

try:
    from uarray import array
except ImportError:
    try:
        from array import array
    except ImportError:
        print("SKIP")
        raise SystemExit

# arrays
print(bytes(array('h', [1, 2])))
print(bytes(array('I', [1, 2])))