This website requires JavaScript.
Odkrywaj
Pomoc
Zarejestruj się
Zaloguj się
mirror
/
micropython
kopia lustrzana
https://github.com/micropython/micropython
Obserwuj
1
Polub
0
Forkuj
You've already forked micropython
0
Kod
Zgłoszenia
Projekty
Wydania
Wiki
Aktywność
f842a40df4
micropython
/
tests
/
pyb
/
switch.py
7 wiersze
87 B
Python
Czysty
Zwykły widok
Historia
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 15:43:27 +00:00
from
pyb
import
Switch
tests, pyb: Add 'import pyb' when needed.
2014-05-04 11:40:51 +00: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 15:43:27 +00:00
print
(
sw
(
)
)
sw
.
callback
(
print
)
sw
.
callback
(
None
)