Handle crashes during test
This commit is contained in:
parent
5caa178c1c
commit
c1fbf1eb5f
1 changed files with 10 additions and 3 deletions
9
test.py
9
test.py
|
|
@ -42,9 +42,16 @@ def main():
|
|||
print(f"{GRAY}No solution{RESET} for {inputpath}")
|
||||
continue
|
||||
|
||||
try:
|
||||
resultstr = subprocess.run(
|
||||
args.command + [inputpath], check=True, capture_output=True, text=True
|
||||
args.command + [inputpath],
|
||||
check=True,
|
||||
text=True,
|
||||
capture_output=True,
|
||||
).stdout
|
||||
except subprocess.CalledProcessError:
|
||||
print(f"{RED}Crashed{RESET} on {inputpath}")
|
||||
continue
|
||||
|
||||
if resultstr.strip() == solutionstr.strip():
|
||||
print(f"{GREEN}Passed{RESET} {inputpath}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue