summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/machine1.py
blob: e0c56116842b5437e32762bfba0a868effffd578 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# test machine module

try:
    try:
        import umachine as machine
    except ImportError:
        import machine
    machine.mem8
except:
    print("SKIP")
    import sys
    sys.exit()

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")