summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/bytes_construct_array.py
blob: 7bdd8f10df4debe42c1812a0d03be1355ffe7857 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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('b', [1, 2])))
print(bytes(array('h', [0x101, 0x202])))