mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix throw of ExternalTestNotFound in external_tests.py
This commit is contained in:
parent
8be32f2267
commit
75960e6db8
@ -59,11 +59,17 @@ def run_external_tests(args: dict):
|
||||
solc_binary_path = args["solc_binary_path"]
|
||||
|
||||
all_test_scripts = detect_external_tests()
|
||||
if args["run_all"]:
|
||||
run_test_scripts(solc_binary_type, solc_binary_path, all_test_scripts)
|
||||
else:
|
||||
selected_tests = args["selected_tests"]
|
||||
if selected_tests:
|
||||
if args["run_all"]:
|
||||
assert len(selected_tests) == 0
|
||||
run_test_scripts(solc_binary_type, solc_binary_path, all_test_scripts)
|
||||
return
|
||||
|
||||
if len(selected_tests) == 0:
|
||||
raise ExternalTestNotFound(
|
||||
"External test was not selected. Please use --run or --run-all option"
|
||||
)
|
||||
|
||||
unrecognized_tests = set(selected_tests) - set(all_test_scripts.keys())
|
||||
if unrecognized_tests != set():
|
||||
raise ExternalTestNotFound(
|
||||
@ -74,9 +80,6 @@ def run_external_tests(args: dict):
|
||||
solc_binary_path,
|
||||
{k: all_test_scripts[k] for k in selected_tests},
|
||||
)
|
||||
raise ExternalTestNotFound(
|
||||
"External test was not selected. Please use --run or --run-all option"
|
||||
)
|
||||
|
||||
|
||||
def parse_commandline() -> Namespace:
|
||||
|
Loading…
Reference in New Issue
Block a user