diff options
author | adityacp | 2018-07-03 11:36:25 +0530 |
---|---|---|
committer | adityacp | 2018-07-03 11:36:25 +0530 |
commit | 637a75a5ea8fcae1e00c0200d52c471d50c8729a (patch) | |
tree | 9a2f13aaf80573fa44465031ccc6f895e7fdda0b /yaksh/hook_evaluator.py | |
parent | 02705e4c676750291b6a5c4ea14e2947f29cb6c7 (diff) | |
parent | e3ad85ace916354ab96b23c1359ee72a6c2a740b (diff) | |
download | online_test-637a75a5ea8fcae1e00c0200d52c471d50c8729a.tar.gz online_test-637a75a5ea8fcae1e00c0200d52c471d50c8729a.tar.bz2 online_test-637a75a5ea8fcae1e00c0200d52c471d50c8729a.zip |
Update to latest changes
Diffstat (limited to 'yaksh/hook_evaluator.py')
-rw-r--r-- | yaksh/hook_evaluator.py | 15 |
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 |