From 59c312ad1ef9079bc6a00deb9f54ab6fa257fc9d Mon Sep 17 00:00:00 2001 From: Mateusz Masiarz Date: Mon, 16 Sep 2024 00:14:01 +0200 Subject: [PATCH] Allow changing oicompare format --- sio/executors/checker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sio/executors/checker.py b/sio/executors/checker.py index bf6d64c..8a898ab 100644 --- a/sio/executors/checker.py +++ b/sio/executors/checker.py @@ -87,10 +87,10 @@ def execute_checker(with_stderr=False, stderr=None): return renv['stdout'] -def _run_compare(env, language): +def _run_compare(env, format): e = SandboxExecutor('oicompare-sandbox-v1.0.2') renv = _run_in_executor( - env, [os.path.join('bin', 'oicompare'), 'hint', 'out', f'{language}_abbreviated'], e, ignore_errors=True + env, [os.path.join('bin', 'oicompare'), 'hint', 'out', format], e, ignore_errors=True ) return renv @@ -116,7 +116,7 @@ def run(environ, use_sandboxes=True): output = _run_checker(environ, use_sandboxes) elif use_sandboxes: - renv = _run_compare(environ, environ.get('checker_language', 'polish')) + renv = _run_compare(environ, environ.get('checker_format', 'english_abbreviated')) if renv['return_code'] == 0: environ['result_code'] = 'OK' environ['result_percentage'] = (100, 1)