From 7eafbd1acc90b1e1899850914a01ada02a8abb61 Mon Sep 17 00:00:00 2001 From: Sergey Date: Thu, 21 Sep 2023 13:10:33 +0300 Subject: [PATCH] fixed process.py in the hypeskill_python for use runner unittest (#2) * fixed process.py in the hypeskill_python for use runner unittest * upgraded Kotlin to 1.9.1 --------- Co-authored-by: hyper Co-authored-by: Alexander Petrov --- epicbox-hyperskill/python/checker/process.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/epicbox-hyperskill/python/checker/process.py b/epicbox-hyperskill/python/checker/process.py index f537b27..f76c386 100644 --- a/epicbox-hyperskill/python/checker/process.py +++ b/epicbox-hyperskill/python/checker/process.py @@ -6,7 +6,7 @@ if __name__ == '__main__': score = 1 feedback = '' - + output = [] code = open('code.txt').read().strip() stdout = open('stdout.txt').read().splitlines() stderr = open('stderr.txt').read().splitlines() @@ -19,10 +19,18 @@ 'stdout:\n{stdout}\n\nstderr:\n{stderr}' .format(stdout='\n'.join(stdout), stderr='\n'.join(stderr)) ) - + if stderr[0] == 'F': + for line in stdout: + if line.startswith('F'): + continue + output.append(line) + for line in stderr: + if line.startswith('F'): + continue + output.append(line) + feedback = '\n'.join(output).strip() elif any(line.startswith(FAILED_TEST_BEGIN) for line in stdout): score = 0 - output = [] output_started = False for line in stdout: