355bf8b553
.. defaulting to off for circuitpython-supported boards, on for others. .. fixing up the tests that fail when it is turned off, so that they skip instead of failing
23 lines
351 B
Python
23 lines
351 B
Python
# test MicroPython-specific features of array.array
|
|
try:
|
|
import array
|
|
except ImportError:
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
try:
|
|
array.array('O')
|
|
except ValueError:
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
# arrays of objects
|
|
a = array.array('O')
|
|
a.append(1)
|
|
print(a[0])
|
|
|
|
# arrays of pointers
|
|
a = array.array('P')
|
|
a.append(1)
|
|
print(a[0])
|