2015-05-07 23:18:28 +00:00
|
|
|
# test machine module
|
|
|
|
|
2015-06-15 22:35:15 +00:00
|
|
|
try:
|
2016-07-31 01:30:48 +00:00
|
|
|
try:
|
|
|
|
import umachine as machine
|
|
|
|
except ImportError:
|
|
|
|
import machine
|
2017-02-14 22:56:22 +00:00
|
|
|
machine.mem8
|
|
|
|
except:
|
2015-06-15 22:35:15 +00:00
|
|
|
print("SKIP")
|
2017-06-10 17:14:16 +00:00
|
|
|
raise SystemExit
|
2015-06-15 22:35:15 +00:00
|
|
|
|
2015-05-07 23:18:28 +00: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")
|