From 658dbc4482f8d4efcf0b06a2ff382bd71b0e244f Mon Sep 17 00:00:00 2001 From: Zonkil Date: Wed, 6 Dec 2023 17:07:06 +0100 Subject: [PATCH] Fixed tests --- oioioi/programs/handlers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oioioi/programs/handlers.py b/oioioi/programs/handlers.py index a28cb207f..4f29a528b 100755 --- a/oioioi/programs/handlers.py +++ b/oioioi/programs/handlers.py @@ -695,9 +695,9 @@ def add_result_percentage(env, **kwargs): return env for test_name, test_result in env['test_results'].items(): - if (test_result['result_percentage'] == 100 - or test_result['result_percentage'] == 0): + percentage = test_result.get('result_percentage', 0) + if percentage == 100 or percentage == 0: continue - test_result['result_string'] = _("Granted %d%% points, comment") % test_result['result_percentage'] + \ + test_result['result_string'] = _("Granted %d%% points, comment") % percentage + \ ': ' + test_result['result_string'] return env