summaryrefslogtreecommitdiff
path: root/yaksh/cpp_stdio_evaluator.py
diff options
context:
space:
mode:
authormaheshgudi2016-09-26 18:15:04 +0530
committermaheshgudi2016-09-26 18:15:04 +0530
commited46c4a2cf6bbf41f50faafc785f001e3d10d195 (patch)
tree7b9175135c6b66702dcdb03b1eaa34b63e6f2855 /yaksh/cpp_stdio_evaluator.py
parent0845f5f67aabd311a4b0bf70d099be07d688bb80 (diff)
downloadonline_test-ed46c4a2cf6bbf41f50faafc785f001e3d10d195.tar.gz
online_test-ed46c4a2cf6bbf41f50faafc785f001e3d10d195.tar.bz2
online_test-ed46c4a2cf6bbf41f50faafc785f001e3d10d195.zip
refactored stdio_evaluator
Diffstat (limited to 'yaksh/cpp_stdio_evaluator.py')
-rw-r--r--yaksh/cpp_stdio_evaluator.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/yaksh/cpp_stdio_evaluator.py b/yaksh/cpp_stdio_evaluator.py
index 4ea1bbf..720ed0f 100644
--- a/yaksh/cpp_stdio_evaluator.py
+++ b/yaksh/cpp_stdio_evaluator.py
@@ -4,12 +4,12 @@ import os
from os.path import isfile
#local imports
-from code_evaluator import CodeEvaluator
-from stdio_evaluator import Evaluator
+
+from stdio_evaluator import StdIOEvaluator
from file_utils import copy_files, delete_files
-class CppStdioEvaluator(CodeEvaluator):
+class CppStdioEvaluator(StdIOEvaluator):
"""Evaluates C StdIO based code"""
def setup(self):
@@ -76,11 +76,10 @@ class CppStdioEvaluator(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
+ )
os.remove(self.ref_output_path)
else:
err = "Error:"