kopia lustrzana https://github.com/micropython/micropython
tests: Skip tests needing machine module if (u)machine doesn't exist.
rodzic
70a28e3ad9
commit
ca39ea7cef
|
@ -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
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
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
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
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
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
# 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
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue