Commit ca39ea7c authored by Damien George's avatar Damien George

tests: Skip tests needing machine module if (u)machine doesn't exist.

parent 70a28e3a
......@@ -4,13 +4,13 @@
# and is callable (has call). The only one available is machine.Signal, which
# in turns needs PinBase.
try:
import umachine as machine
except ImportError:
import machine
try:
try:
import umachine as machine
except ImportError:
import machine
machine.PinBase
machine.Signal
except AttributeError:
except:
print("SKIP")
raise SystemExit
......
try:
import umachine as machine
except ImportError:
import machine
try:
try:
import umachine as machine
except ImportError:
import machine
machine.PinBase
except AttributeError:
except:
print("SKIP")
raise SystemExit
......
try:
import umachine as machine
except ImportError:
import machine
try:
try:
import umachine as machine
except ImportError:
import machine
machine.PinBase
machine.time_pulse_us
except AttributeError:
except:
print("SKIP")
raise SystemExit
......
# test machine.Signal class
try:
import umachine as machine
except ImportError:
import machine
try:
try:
import umachine as machine
except ImportError:
import machine
machine.PinBase
machine.Signal
except AttributeError:
except:
print("SKIP")
raise SystemExit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment