summaryrefslogtreecommitdiff
path: root/yaksh/python_stdio_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/python_stdio_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/python_stdio_evaluator.py')
-rw-r--r--yaksh/python_stdio_evaluator.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/yaksh/python_stdio_evaluator.py b/yaksh/python_stdio_evaluator.py
index cd8c52a..1506685 100644
--- a/yaksh/python_stdio_evaluator.py
+++ b/yaksh/python_stdio_evaluator.py
@@ -42,7 +42,7 @@ class PythonStdioEvaluator(CodeEvaluator):
super(PythonStdioEvaluator, self).teardown()
- def compile_code(self, user_answer, file_paths, expected_input, expected_output, weightage):
+ def compile_code(self, user_answer, file_paths, expected_input, expected_output, weight):
if file_paths:
self.files = copy_files(file_paths)
submitted = compile(user_answer, '<string>', mode='exec')
@@ -58,15 +58,15 @@ class PythonStdioEvaluator(CodeEvaluator):
return self.output_value
def check_code(self, user_answer, file_paths, partial_grading, expected_input,
- expected_output, weightage):
+ expected_output, weight):
success = False
- test_case_weightage = 0.0
+ test_case_weight = 0.0
tb = None
if self.output_value == expected_output:
success = True
err = "Correct answer"
- test_case_weightage = weightage
+ test_case_weight = weight
else:
success = False
err = dedent("""
@@ -80,4 +80,4 @@ class PythonStdioEvaluator(CodeEvaluator):
)
)
del tb
- return success, err, test_case_weightage
+ return success, err, test_case_weight