diff options
author | maheshgudi | 2016-09-26 18:15:04 +0530 |
---|---|---|
committer | maheshgudi | 2016-09-26 18:15:04 +0530 |
commit | ed46c4a2cf6bbf41f50faafc785f001e3d10d195 (patch) | |
tree | 7b9175135c6b66702dcdb03b1eaa34b63e6f2855 /yaksh/bash_stdio_evaluator.py | |
parent | 0845f5f67aabd311a4b0bf70d099be07d688bb80 (diff) | |
download | online_test-ed46c4a2cf6bbf41f50faafc785f001e3d10d195.tar.gz online_test-ed46c4a2cf6bbf41f50faafc785f001e3d10d195.tar.bz2 online_test-ed46c4a2cf6bbf41f50faafc785f001e3d10d195.zip |
refactored stdio_evaluator
Diffstat (limited to 'yaksh/bash_stdio_evaluator.py')
-rw-r--r-- | yaksh/bash_stdio_evaluator.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/yaksh/bash_stdio_evaluator.py b/yaksh/bash_stdio_evaluator.py index 56f2e35..8ff0743 100644 --- a/yaksh/bash_stdio_evaluator.py +++ b/yaksh/bash_stdio_evaluator.py @@ -3,12 +3,12 @@ import subprocess import os from os.path import isfile -#local imports -from code_evaluator import CodeEvaluator -from stdio_evaluator import Evaluator +# local imports +from stdio_evaluator import StdIOEvaluator from file_utils import copy_files, delete_files -class BashStdioEvaluator(CodeEvaluator): + +class BashStdioEvaluator(StdIOEvaluator): """Evaluates Bash StdIO based code""" def setup(self): @@ -41,9 +41,8 @@ class BashStdioEvaluator(CodeEvaluator): stdout=subprocess.PIPE, stderr=subprocess.PIPE ) - evaluator = Evaluator() - success, err = evaluator.evaluate(user_answer, proc, - expected_input, - expected_output - ) + success, err = self.evaluate_stdio(user_answer, proc, + expected_input, + expected_output + ) return success, err |