summaryrefslogtreecommitdiff
path: root/yaksh/code_evaluator.py
diff options
context:
space:
mode:
authorankitjavalkar2016-11-16 11:25:30 +0530
committerankitjavalkar2016-11-16 11:25:30 +0530
commitb32d7e91fe608c4cbd09b50520d4a3cab75d2e53 (patch)
treeab726e234a2c72aa3a926a2ed70ae54e9b8919ee /yaksh/code_evaluator.py
parent232c4480d47b75fcdb523e5ebb601959c56e40dc (diff)
downloadonline_test-b32d7e91fe608c4cbd09b50520d4a3cab75d2e53.tar.gz
online_test-b32d7e91fe608c4cbd09b50520d4a3cab75d2e53.tar.bz2
online_test-b32d7e91fe608c4cbd09b50520d4a3cab75d2e53.zip
Change test_case weightage field name to weight
Diffstat (limited to 'yaksh/code_evaluator.py')
-rw-r--r--yaksh/code_evaluator.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/yaksh/code_evaluator.py b/yaksh/code_evaluator.py
index b39a1d7..50fc546 100644
--- a/yaksh/code_evaluator.py
+++ b/yaksh/code_evaluator.py
@@ -82,14 +82,14 @@ class CodeEvaluator(object):
Returns
-------
- A tuple: (success, error message, weightage).
+ A tuple: (success, error message, weight).
"""
self.setup()
- success, error, weightage = self.safe_evaluate(**kwargs)
+ success, error, weight = self.safe_evaluate(**kwargs)
self.teardown()
- result = {'success': success, 'error': error, 'weightage': weightage}
+ result = {'success': success, 'error': error, 'weight': weight}
return result
# Private Protocol ##########
@@ -109,20 +109,20 @@ class CodeEvaluator(object):
prev_handler = create_signal_handler()
success = False
error = ""
- weightage = 0
+ weight = 0
# Do whatever testing needed.
try:
for test_case in test_case_data:
success = False
self.compile_code(user_answer, file_paths, **test_case)
- success, err, test_case_weightage = self.check_code(user_answer,
+ success, err, test_case_weight = self.check_code(user_answer,
file_paths,
partial_grading,
**test_case
)
if success:
- weightage += test_case_weightage
+ weight += test_case_weight
error = err
else:
error += err + "\n"
@@ -142,7 +142,7 @@ class CodeEvaluator(object):
# Set back any original signal handler.
set_original_signal_handler(prev_handler)
- return success, error, weightage
+ return success, error, weight
def teardown(self):
# Cancel the signal