diff options
author | mahesh | 2017-03-20 17:04:46 +0530 |
---|---|---|
committer | mahesh | 2017-03-20 17:04:46 +0530 |
commit | b5daabb45621ac47c98382303800cb7a240827c2 (patch) | |
tree | f3369879e3170a2a5e831fe6763a4615d27e2bec /yaksh/stdio_evaluator.py | |
parent | ac292ed1099b49f9d0e8a7ed3699bacdd8031de3 (diff) | |
parent | 23ecd8fa33e7fa2e953aa9715ae45a2869a044a0 (diff) | |
download | online_test-b5daabb45621ac47c98382303800cb7a240827c2.tar.gz online_test-b5daabb45621ac47c98382303800cb7a240827c2.tar.bz2 online_test-b5daabb45621ac47c98382303800cb7a240827c2.zip |
Merge branch 'master' of https://github.com/fossee/online_test into fill_in_the_blanks
Diffstat (limited to 'yaksh/stdio_evaluator.py')
-rw-r--r-- | yaksh/stdio_evaluator.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/yaksh/stdio_evaluator.py b/yaksh/stdio_evaluator.py index fb9dfb3..fa78a68 100644 --- a/yaksh/stdio_evaluator.py +++ b/yaksh/stdio_evaluator.py @@ -14,17 +14,17 @@ class StdIOEvaluator(BaseEvaluator): output_err = output_err_bytes.decode('utf-8') expected_output = expected_output.replace("\r", "") if not expected_input: - error_msg = "Expected Output is {0} ".\ - format(repr(expected_output)) + error_msg = "Expected Output is\n{0} ".\ + format(str(expected_output)) else: - error_msg = " Given Input is\n {0} \n Expected Output is {1} ".\ - format(expected_input, repr(expected_output)) + error_msg = "Given Input is\n{0}\nExpected Output is\n{1}".\ + format(expected_input, str(expected_output)) if output_err == '': if user_output == expected_output: success, err = True, None else: - err = " Incorrect answer\n" + error_msg +\ - "\n Your output is {0}".format(repr(user_output)) + err = "Incorrect answer:\n" + error_msg +\ + "\nYour output is\n{0}".format(str(user_output)) else: - err = "Error:\n {0}".format(output_err) + err = "Error:\n{0}".format(output_err) return success, err |