Unit testing not working as expected #10275
-
Hi,
My simple unittest testing directory looks like:
Running an individual test (without a tests dir) works but when running
Is there any example how to get unittest to work when bundling all tests inside another tests directory? FYI:
and tests/test_calculations.py looks like:
Both init.py files are empty |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@saraverbeecke The problem is that fnmatch is using re.sub (see https://github.com/micropython/micropython-lib/blob/master/python-stdlib/fnmatch/fnmatch.py#L135) but this is not available But in the meantime, you can enable it in your build by adding #define MICROPY_PY_URE_SUB (1) in either unix/mpconfigport.h (or your mpconfigvariant.h if you have one). |
Beta Was this translation helpful? Give feedback.
@saraverbeecke The problem is that fnmatch is using re.sub (see https://github.com/micropython/micropython-lib/blob/master/python-stdlib/fnmatch/fnmatch.py#L135) but this is not available
by default on the unix buildon whichever build you're using.But in the meantime, you can enable it in your build by adding
in either unix/mpconfigport.h (or your mpconfigvariant.h if you have one).