mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-08 02:57:16 +08:00
`Tools/scripts/build_tests/test_ccache.py` has a filename that will make Pytest Discovery think that it should be tested. * https://docs.pytest.org/en/stable/explanation/goodpractices.html#conventions-for-python-test-discovery This script also has code ___at global scope___ that will fail if certain command line arguments are not provided. The proposed change is to put that code under `if __name__ == "__main__":` so it will not be run at test time. * https://docs.python.org/3/library/__main__.html Search for `test_ccache`: * https://github.com/search?q=repo%3AArduPilot%2Fardupilot%20test_ccache&type=code How was this tested? 1. `pytest Tools/scripts/build_tests/test_ccache.py` 2. `pytest Tools` Both of the above find no tests instead of crashing with a long, confusing error.