micropython/tests/extmod/machine1.py

29 wiersze
419 B
Python
Czysty Zwykły widok Historia

# test machine module
try:
try:
import umachine as machine
except ImportError:
import machine
2017-02-14 22:56:22 +00:00
machine.mem8
except:
print("SKIP")
raise SystemExit
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")