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,23 +59,26 @@ def run_external_tests(args: dict):
|
|||||||
solc_binary_path = args["solc_binary_path"]
|
solc_binary_path = args["solc_binary_path"]
|
||||||
|
|
||||||
all_test_scripts = detect_external_tests()
|
all_test_scripts = detect_external_tests()
|
||||||
|
selected_tests = args["selected_tests"]
|
||||||
if args["run_all"]:
|
if args["run_all"]:
|
||||||
|
assert len(selected_tests) == 0
|
||||||
run_test_scripts(solc_binary_type, solc_binary_path, all_test_scripts)
|
run_test_scripts(solc_binary_type, solc_binary_path, all_test_scripts)
|
||||||
else:
|
return
|
||||||
selected_tests = args["selected_tests"]
|
|
||||||
if selected_tests:
|
if len(selected_tests) == 0:
|
||||||
unrecognized_tests = set(selected_tests) - set(all_test_scripts.keys())
|
raise ExternalTestNotFound(
|
||||||
if unrecognized_tests != set():
|
"External test was not selected. Please use --run or --run-all option"
|
||||||
raise ExternalTestNotFound(
|
)
|
||||||
f"External test(s) not found: {', '.join(unrecognized_tests)}"
|
|
||||||
)
|
unrecognized_tests = set(selected_tests) - set(all_test_scripts.keys())
|
||||||
run_test_scripts(
|
if unrecognized_tests != set():
|
||||||
solc_binary_type,
|
raise ExternalTestNotFound(
|
||||||
solc_binary_path,
|
f"External test(s) not found: {', '.join(unrecognized_tests)}"
|
||||||
{k: all_test_scripts[k] for k in selected_tests},
|
)
|
||||||
)
|
run_test_scripts(
|
||||||
raise ExternalTestNotFound(
|
solc_binary_type,
|
||||||
"External test was not selected. Please use --run or --run-all option"
|
solc_binary_path,
|
||||||
|
{k: all_test_scripts[k] for k in selected_tests},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user