Hi, i like to run unit tests stored on a Windows 10 host pc with mpremote. So basically the Pyboard D should run the unit_tests from this folder. I am not sure if this is possible.
The number of unit tests can quickly increase and until now i have stored them on the Pyboard D device which takes a lot of space.
To create unit tests i use the unittest.TestSuite().
Suppose i store all unit tests in a folder named c:\unit_test on my Windows 10 host pc. How can i run them using a script with mpremote?
Anyone done this before?
How to run unit tests stored on host with mpremote?
-
- Posts: 15
- Joined: Tue Aug 09, 2022 11:32 am
Re: How to run unit tests stored on host with mpremote?
mpremote is based on the pyboard.py tool (available as tools/pyboard.py in https://github.com/micropython/micropython)
pyboard.py is both a standalone tool, but also a library that can be used to script an interaction with a connected micropython device. Despite the name it works on all supported boards.
The documentation is here
https://docs.micropython.org/en/latest/ ... rd.py.html
(Specifically see the very end about how to use it as a library -- you can use pyb.execfile instead of pyb.exec for your use case).
Re: How to run unit tests stored on host with mpremote?
I forgot to mention also, this may be relevant: https://github.com/BrianPugh/belay