[PATCH v2 17/41] test/py: Relax the naming rules for unit tests

Simon Glass sjg at chromium.org
Wed Nov 24 23:22:21 CET 2021


At present the collection function used by pytest is quite strict on the
naming of the functions it detects. In particular it requires the name of
the test to be repeated in the function name.

This is not enforced anywhere else, but instead the tests are silently
omitted from the pytest run. This affects a few dozen tests.

The rule does not seem to have any particular purpose. Relax it, so that
all tests that use the UNIT_TEST() macro will run, regardless of the name
of the test function.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 test/py/conftest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list