summaryrefslogtreecommitdiff
path: root/yaksh/hook_evaluator.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2018-06-07 16:14:37 +0530
committerGitHub2018-06-07 16:14:37 +0530
commit4eb754c2e71922819de7390d1b4993a21763de3e (patch)
treefede3f4250f3711d31da4bb7edd262edd0a90727 /yaksh/hook_evaluator.py
parent78ce1804d3a82327aa0da1510bb5c03d6bbff3ba (diff)
parent93bb10eae5e1364ae6492f2534f0e7864c9c4254 (diff)
downloadonline_test-4eb754c2e71922819de7390d1b4993a21763de3e.tar.gz
online_test-4eb754c2e71922819de7390d1b4993a21763de3e.tar.bz2
online_test-4eb754c2e71922819de7390d1b4993a21763de3e.zip
Merge pull request #482 from adityacp/pep8_changes
Pep8 changes
Diffstat (limited to 'yaksh/hook_evaluator.py')
-rw-r--r--yaksh/hook_evaluator.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/yaksh/hook_evaluator.py b/yaksh/hook_evaluator.py
index 41ef6e4..33c1549 100644
--- a/yaksh/hook_evaluator.py
+++ b/yaksh/hook_evaluator.py
@@ -40,18 +40,19 @@ class HookEvaluator(BaseEvaluator):
--------
Returns a tuple (success, error, test_case_weight)
- success - Boolean, indicating if code was executed successfully, correctly
+ success - Boolean, indicating if code was executed successfully,
+ correctly
mark_fraction - Float, indicating fraction of the weight to a test case
error - String, error message if success is false
- returns (True, "Correct answer", 1.0) : If the student script passes all
- test cases/have same output, when compared to the instructor script
+ returns (True, "Correct answer", 1.0) : If the student script passes
+ all test cases/have same output, when compared to the instructor script
returns (False, error_msg, 0.0): If the student script fails a single
test/have dissimilar output, when compared to the instructor script.
- Returns (False, error_msg, 0.0): If mandatory arguments are not files or if
- the required permissions are not given to the file(s).
+ Returns (False, error_msg, 0.0): If mandatory arguments are not files
+ or if the required permissions are not given to the file(s).
"""
if self.file_paths:
self.files = copy_files(self.file_paths)
@@ -84,8 +85,8 @@ class HookEvaluator(BaseEvaluator):
del tb_list[1:3]
err = prettify_exceptions(exc_type.__name__,
str(exc_value),
- "Error in Hook Code:\n"
- + "".join(tb_list)
+ "Error in Hook Code:\n" + "".join(
+ tb_list)
)
return success, err, mark_fraction