Should we use mpremote or pyboard to test #10282
-
Hello fellow MicroPython enthousiasts, Using unittest and unittest-discover for MicroPython seems to work ok for simple code testing using stubs or mocking things related to the hardware. But is there a good way to for example use pytest (or the untittest) module of CPython and write tests that can also executes code on the connected board to validate a hardware test outcome?
Do we know what the roadmap is for Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
If you install mpremote from pip, you also get pyboard, so even if you just want to remote control your board from Python, you can make mpremote a project dependency and just use the pyboard module. I do not recommend using mpremote via subprocess! Everything you need should be available from pyboard.py. FWIW, I just sent a PR to add some additional functionality that might be useful when using pyboard.py as a library. #10286 |
Beta Was this translation helpful? Give feedback.
-
@jimmo
I have installed At the moment I manually brought |
Beta Was this translation helpful? Give feedback.
pyboard.py
is a library for interacting with connected boards, as well as a rudimentary command line interface.mpremote
uses pyboard.py in order to provide a much more complete command line interface.If you install mpremote from pip, you also get pyboard, so even if you just want to remote control your board from Python, you can make mpremote a project dependency and just use the pyboard module.
I do not recommend using mpremote via subprocess! Everything you need should be available from pyboard.py.
FWIW, I just sent a PR to add some additional functionality that might be useful when using pyboard.py as a library. #10286