run_tests_for: recognize `test_`/`unittest_` prefixes as tests

Apparently some upstream conventions use `test_${x}.py` instead of this
repo's standard of `${x}_(test|unittest).py`. Either seems fine, and
supporting both seems simple.

This includes some formatting updates from yapf.

BUG=None
TEST=`./run_tests_for.py llvm_tools/*.py`
TEST=Made a new test_foo.py script; saw that it was picked up.

Change-Id: I533a9395227d8342411cacfbd1bb6d5c63b8ec2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3163797
Reviewed-by: Jordan R Abrahams <ajordanr@google.com>
Commit-Queue: George Burgess <gbiv@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
1 file changed