Skip to content

Commit c3f519a

Browse files
committed
tests/extmod/machine_pinbase: Skip if machine.PinBase is not available.
1 parent bd6622a commit c3f519a

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

tests/extmod/machine_pinbase.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
try:
2-
from umachine import PinBase
2+
import umachine as machine
33
except ImportError:
4-
from machine import PinBase
4+
import machine
5+
try:
6+
machine.PinBase
7+
except AttributeError:
8+
print("SKIP")
9+
import sys
10+
sys.exit()
511

612

7-
class MyPin(PinBase):
13+
class MyPin(machine.PinBase):
814

915
def __init__(self):
1016
print("__init__")

0 commit comments

Comments
 (0)