summaryrefslogtreecommitdiff
path: root/yaksh/bash_code_evaluator.py
diff options
context:
space:
mode:
authorankitjavalkar2016-12-19 19:37:23 +0530
committerankitjavalkar2016-12-20 12:46:04 +0530
commit798d36aa12e22928e884668ae5c80a25d48393ea (patch)
tree8de32b8f4eac72ad103272ab056c421c46718c11 /yaksh/bash_code_evaluator.py
parent4a0f94084bc26559ef3e26470619e87314f9d70e (diff)
downloadonline_test-798d36aa12e22928e884668ae5c80a25d48393ea.tar.gz
online_test-798d36aa12e22928e884668ae5c80a25d48393ea.tar.bz2
online_test-798d36aa12e22928e884668ae5c80a25d48393ea.zip
Change weight variable name to mark_fraction
Diffstat (limited to 'yaksh/bash_code_evaluator.py')
-rw-r--r--yaksh/bash_code_evaluator.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/yaksh/bash_code_evaluator.py b/yaksh/bash_code_evaluator.py
index 43d7be7..1e6fc9c 100644
--- a/yaksh/bash_code_evaluator.py
+++ b/yaksh/bash_code_evaluator.py
@@ -60,7 +60,7 @@ class BashCodeEvaluator(BaseEvaluator):
"""
ref_code_path = self.test_case
success = False
- test_case_weight = 0.0
+ mark_fraction = 0.0
self.submit_code_path = self.create_submit_code_file('submit.sh')
self._set_file_as_executable(self.submit_code_path)
@@ -103,8 +103,8 @@ class BashCodeEvaluator(BaseEvaluator):
)
proc, stdnt_stdout, stdnt_stderr = ret
if inst_stdout == stdnt_stdout:
- test_case_weight = float(self.weight) if self.partial_grading else 0.0
- return True, "Correct answer", test_case_weight
+ mark_fraction = float(self.weight) if self.partial_grading else 0.0
+ return True, "Correct answer", mark_fraction
else:
err = "Error: expected %s, got %s" % (inst_stderr,
stdnt_stderr
@@ -146,8 +146,8 @@ class BashCodeEvaluator(BaseEvaluator):
proc, stdnt_stdout, stdnt_stderr = ret
valid_answer = inst_stdout == stdnt_stdout
if valid_answer and (num_lines == loop_count):
- test_case_weight = float(self.weight) if self.partial_grading else 0.0
- return True, "Correct answer", test_case_weight
+ mark_fraction = float(self.weight) if self.partial_grading else 0.0
+ return True, "Correct answer", mark_fraction
else:
err = ("Error:expected"
" {0}, got {1}").format(inst_stdout+inst_stderr,