diff options
author | adityacp | 2020-01-24 10:03:39 +0530 |
---|---|---|
committer | adityacp | 2020-01-24 10:03:39 +0530 |
commit | 547575e98d119a00472efe3d70693ed972468031 (patch) | |
tree | 2fc350741ebf7d78ec62eb2b41f262d53514e612 /yaksh/python_stdio_evaluator.py | |
parent | ebbb1b4d3dcec668b901200de7b31253162da80c (diff) | |
parent | 7edfc63ab89d65337e17e8a79e8114a74b2146e3 (diff) | |
download | online_test-547575e98d119a00472efe3d70693ed972468031.tar.gz online_test-547575e98d119a00472efe3d70693ed972468031.tar.bz2 online_test-547575e98d119a00472efe3d70693ed972468031.zip |
Resolve conflicts in grade user, custom filters etc
Diffstat (limited to 'yaksh/python_stdio_evaluator.py')
-rw-r--r-- | yaksh/python_stdio_evaluator.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yaksh/python_stdio_evaluator.py b/yaksh/python_stdio_evaluator.py index 64a2809..a1e8f72 100644 --- a/yaksh/python_stdio_evaluator.py +++ b/yaksh/python_stdio_evaluator.py @@ -46,6 +46,7 @@ class PythonStdIOEvaluator(BaseEvaluator): if self.file_paths: self.files = copy_files(self.file_paths) submitted = compile(self.user_answer, '<string>', mode='exec') + self.expected_output = self.expected_output.replace('\r', '') if self.expected_input: self.expected_input = self.expected_input.replace('\r', '') input_buffer = StringIO() @@ -55,7 +56,7 @@ class PythonStdIOEvaluator(BaseEvaluator): with redirect_stdout() as output_buffer: exec_scope = {} exec(submitted, exec_scope) - self.output_value = output_buffer.getvalue().rstrip("\n") + self.output_value = output_buffer.getvalue() return self.output_value def check_code(self): |