mirror of
https://github.com/licsber/micropython.git
synced 2024-09-21 17:40:24 +08:00
15 lines
295 B
Python
15 lines
295 B
Python
# 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])))
|