Skip to content

Commit

Permalink
fixed process.py in the hypeskill_python for use runner unittest (#2)
Browse files Browse the repository at this point in the history
* fixed process.py in the hypeskill_python for use runner unittest

* upgraded Kotlin to 1.9.1

---------

Co-authored-by: hyper <[email protected]>
Co-authored-by: Alexander Petrov <[email protected]>
  • Loading branch information
3 people authored Sep 21, 2023
1 parent f9dbe24 commit 7eafbd1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions epicbox-hyperskill/python/checker/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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:
Expand Down

0 comments on commit 7eafbd1

Please sign in to comment.