summaryrefslogtreecommitdiff
path: root/yaksh/hook_evaluator.py
diff options
context:
space:
mode:
authoradityacp2018-05-24 12:07:39 +0530
committeradityacp2018-06-07 14:50:47 +0530
commit97b657edc2a323f832c81f0e34ce5761bd21f7e9 (patch)
tree09f4367f813fab99ffa8cd540d246cfc8c8fa00a /yaksh/hook_evaluator.py
parent78ce1804d3a82327aa0da1510bb5c03d6bbff3ba (diff)
downloadonline_test-97b657edc2a323f832c81f0e34ce5761bd21f7e9.tar.gz
online_test-97b657edc2a323f832c81f0e34ce5761bd21f7e9.tar.bz2
online_test-97b657edc2a323f832c81f0e34ce5761bd21f7e9.zip
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