2015-05-08 00:18:28 +01:00
|
|
|
# test machine module
|
|
|
|
|
2015-06-15 23:35:15 +01:00
|
|
|
try:
|
2016-07-31 02:30:48 +01:00
|
|
|
try:
|
|
|
|
import umachine as machine
|
|
|
|
except ImportError:
|
|
|
|
import machine
|
2017-02-14 22:56:22 +00:00
|
|
|
machine.mem8
|
|
|
|
except:
|
2015-06-15 23:35:15 +01:00
|
|
|
print("SKIP")
|
2017-06-10 18:14:16 +01:00
|
|
|
raise SystemExit
|
2015-06-15 23:35:15 +01:00
|
|
|
|
2015-05-08 00:18:28 +01:00
|
|
|
print(machine.mem8)
|
|
|
|
|
|
|
|
try:
|
|
|
|
machine.mem16[1]
|
|
|
|
except ValueError:
|
|
|
|
print("ValueError")
|
|
|
|
|
|
|
|
try:
|
|
|
|
machine.mem16[1] = 1
|
|
|
|
except ValueError:
|
|
|
|
print("ValueError")
|
|
|
|
|
|
|
|
try:
|
|
|
|
del machine.mem8[0]
|
|
|
|
except TypeError:
|
|
|
|
print("TypeError")
|