Replies: 1 comment
-
I think I have found my answer, there is a unittest in lib/micropython/lib/micropython-lib/python-stdlib/unittest that is usable with Micropython. I was unsure how to make a library out of it as there are a couple of items in the library. This was solved when I stumbled upon the Micropython Install Packages which showed me the packaging (and also placed a copy in ~/.micropython/lib/unittest) The micropython unittest is missing mock funcationality. There is a umock that is missing async functionality, but seems like a reasonable start for using mock with the micropython unittest. (Work I still have to try and do). There is also umock but it hasn't been modified since 2019 and looks to be an initial version 0.0.1. I am guessing another step is to understand the manifest.py file to add frozen libraries to my build. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have searched and "unittest" was at one point (in 2018 with micropython-unittest 0.4) working with micropython. However, a lot has probably changed since then and I was wondering what other people do for unit testing there micropython+lvgl code.
I have code that now runs on an embedded ESP32 screen along with on my MacOS and Linux systems. Not everything is perfect though. As I also need a way of using a serial port on my Mac/Linux box with micropython to more faithfully emulate the ESP32 device (which talks to another device via it's serial port).
Suggestions welcome.
Beta Was this translation helpful? Give feedback.
All reactions