mbedtls
mbedtls copied to clipboard
Minor fixes to test_data_generation.py
This is a collection of minor fixes to issues I found in Python scripts near the end of my review of https://github.com/Mbed-TLS/mbedtls/pull/6093. I didn't want to hold that PR for minor, mostly preexisting issues, hence this follow-up.
-
Less ambiguous name for
test_generation.py
. - Fix paths when not invoked from the mbedtls root.
- Docstring that should have been a comment.
- Use relative imports (fixes e.g. running
python3 -m unittest scripts/mbedtls_dev/psa_storage.py
). - Unify the 4 copies of
check_repo_path
(reported bypylint
when not running with-j
). - Don't run pylint with
-j
since that makes it not signal code that's duplicated in different modules.
Changelog: no (no user-visible bugs were fixed).
Backport: TODO (once #6093 is backported).