This website requires JavaScript.
Explore
Help
Sign In
mirrors
/
micropython
mirror of
https://github.com/micropython/micropython.git
Watch
1
Star
0
Fork
You've already forked micropython
0
Code
Issues
Packages
Projects
Releases
Wiki
Activity
ed8b4da0db
micropython
/
tests
/
pyb
/
switch.py
7 lines
87 B
Python
Raw
Normal View
History
Unescape
Escape
tests: Add a suite of tests specifically for the pyboard. In tests/pyb is now a suite of tests that tests the pyb module on the pyboard. They include expected output files because we can't run CPython on the pyboard to compare against. run-tests script has now been updated to allow pyboard tests to be run. Just pass the option --pyboard. This runs all basic, float and pyb tests. Note that float/math-fun.py currently fails because not all math functions are implemented in stmhal/.
2014-05-03 16:43:27 +01:00
from
pyb
import
Switch
tests, pyb: Add 'import pyb' when needed.
2014-05-04 12:40:51 +01:00
sw
=
Switch
(
)
tests: Add a suite of tests specifically for the pyboard. In tests/pyb is now a suite of tests that tests the pyb module on the pyboard. They include expected output files because we can't run CPython on the pyboard to compare against. run-tests script has now been updated to allow pyboard tests to be run. Just pass the option --pyboard. This runs all basic, float and pyb tests. Note that float/math-fun.py currently fails because not all math functions are implemented in stmhal/.
2014-05-03 16:43:27 +01:00
print
(
sw
(
)
)
sw
.
callback
(
print
)
sw
.
callback
(
None
)