Merge pull request #3429 from chromatic/1.14.7-add-pull-tester-error-checking

[QA] Check command-line arguments for test runner
This commit is contained in:
Old Dip Tracker 2024-02-20 02:16:39 +01:00 committed by GitHub
commit 02040c5414
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -222,6 +222,10 @@ def runtests():
if t in opts or re.sub(".py$", "", t) in opts:
test_list.append(t)
if len(test_list) == 0:
print(f"No tests selected; do you have a typo in {opts}?")
sys.exit(1)
if print_help:
# Only print help of the first script and exit
subprocess.check_call((RPC_TESTS_DIR + test_list[0]).split() + ['-h'])