2015-08-30 00:30:28 +03:00
|
|
|
# test construction of bytes from different objects
|
|
|
|
|
2017-03-09 00:07:19 +01:00
|
|
|
try:
|
2019-10-22 17:33:23 +11:00
|
|
|
from uarray import array
|
2017-03-09 00:07:19 +01:00
|
|
|
except ImportError:
|
2019-10-22 17:33:23 +11:00
|
|
|
try:
|
|
|
|
from array import array
|
|
|
|
except ImportError:
|
|
|
|
print("SKIP")
|
|
|
|
raise SystemExit
|
2015-08-30 00:30:28 +03:00
|
|
|
|
|
|
|
# arrays
|
|
|
|
print(bytes(array('h', [1, 2])))
|
|
|
|
print(bytes(array('I', [1, 2])))
|