Skip to content

Commit

Permalink
Allow changing oicompare format
Browse files Browse the repository at this point in the history
  • Loading branch information
MasloMaslane committed Sep 15, 2024
1 parent 4e5b41d commit 59c312a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sio/executors/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down

0 comments on commit 59c312a

Please sign in to comment.