Repository navigation
examples/usercmodule: Add example of custom type. - #10038
laurensvalk wants to merge 1 commit into
Conversation
151ea86 to
f22ed07
Compare
This shows how ports can add their own custom types/classes. It is part of the unix coverage build, so we can use it for tests too. Signed-off-by: Laurens Valk <[email protected]>
f22ed07 to
162fee7
Compare
|
Thanks, this is a nice addition to have as an example of a C class. Rebased and merged in a67989a, with a minor change to change |
|
This introduced random test failures in CI, like this one. Could we implement this in a way that is not timing-dependent? |
|
This was already noted above, but apparently sleep_ms in the qemu tests can be off by even more than 10 ms. Is that a separate bug? I’m happy to update this test to make sure the time isn’t too critical, though. |
|
If I'm reading the result log properly, it failed here: micropython/tests/misc/cexample_class.py Line 13 in 7fe7c55 If I had to guess, it is because it blocked on the |
|
I was also wondering if that Note that we do have quite a few tests (mostly uasyncio) that rely on timing, and they are quite robust now (after some effort, eg c012318). |
|
Thanks Damien and Damien. Fix proposed in #10072. |
removed delay before init of cyw43
This shows how ports can add their own custom types (classes).
Since this is part of the unix coverage build, we can use it for future tests too. This could then support #9997.
EDIT: Relax constraint on timer test since that isn't really the point of this test. On the qemu port,
sleep_ms(100)would sometimes take more than 105 ms.