Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
ca39ea7c
Commit
ca39ea7c
authored
Apr 28, 2019
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: Skip tests needing machine module if (u)machine doesn't exist.
parent
70a28e3a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
20 deletions
+20
-20
tests/basics/subclass_native_call.py
tests/basics/subclass_native_call.py
+5
-5
tests/extmod/machine_pinbase.py
tests/extmod/machine_pinbase.py
+5
-5
tests/extmod/machine_pulse.py
tests/extmod/machine_pulse.py
+5
-5
tests/extmod/machine_signal.py
tests/extmod/machine_signal.py
+5
-5
No files found.
tests/basics/subclass_native_call.py
View file @
ca39ea7c
...
...
@@ -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
...
...
tests/extmod/machine_pinbase.py
View file @
ca39ea7c
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
...
...
tests/extmod/machine_pulse.py
View file @
ca39ea7c
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
...
...
tests/extmod/machine_signal.py
View file @
ca39ea7c
# 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment