fix: use logger instead of direct assert
All checks were successful
build / build (pull_request) Successful in 1m50s
build / build (push) Successful in 1m52s

This commit is contained in:
李衍志523370910113 2025-05-23 20:43:21 +08:00
parent 7265411abe
commit 044d0f0d41

View File

@ -1,4 +1,3 @@
import os
import re import re
import shlex import shlex
from functools import partial from functools import partial
@ -256,7 +255,7 @@ def get_testcases(
) -> Set[str]: # basedir here should be task_conf.root / task_conf.path ) -> Set[str]: # basedir here should be task_conf.root / task_conf.path
testcases = set() testcases = set()
for testcases_path in (task_root / task_path).parent.glob("**/*.in"): for testcases_path in (task_root / task_path).parent.glob("**/*.in"):
if not os.path.exists(str(testcases_path).removesuffix(".in") + ".out"): if not testcases_path.with_suffix(".out").exists():
logger.warning(f"Testcase {testcases_path} has no corresponding .out file") logger.warning(f"Testcase {testcases_path} has no corresponding .out file")
continue continue
testcases.add( testcases.add(