hotfix run.py run

This commit is contained in:
2026-05-06 18:11:19 +09:00
parent be454e4420
commit 8f0ec6cead

7
run.py
View File

@@ -644,12 +644,10 @@ def run(lang: str, testcase: tuple[str, ...], verbose: bool):
f_in_path = f"{TC_DIR}/{tc}.in"
f_out_path = f"{TC_DIR}/{tc}.out"
with (
open(f_in_path, "r", encoding="utf-8") as f_in,
open(f_out_path, "r", encoding="utf-8") as f_out,
):
with open(f_out_path, "r", encoding="utf-8") as f_out:
expected = f_out.read().strip()
f_in = open(f_in_path, "r", encoding="utf-8")
proc = subprocess.Popen(
target_language.executable_command,
stdin=f_in,
@@ -663,6 +661,7 @@ def run(lang: str, testcase: tuple[str, ...], verbose: bool):
print(line, end="")
stdout, stderr = proc.communicate()
f_in.close()
if proc.returncode != 0:
click.secho(">>>>>> [RUN TIME ERROR] >>>>>>", fg="red", bold=True)