From ed46c4a2cf6bbf41f50faafc785f001e3d10d195 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Mon, 26 Sep 2016 18:15:04 +0530 Subject: refactored stdio_evaluator --- yaksh/java_stdio_evaluator.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'yaksh/java_stdio_evaluator.py') diff --git a/yaksh/java_stdio_evaluator.py b/yaksh/java_stdio_evaluator.py index 27dd4a9..f4b8773 100644 --- a/yaksh/java_stdio_evaluator.py +++ b/yaksh/java_stdio_evaluator.py @@ -4,12 +4,11 @@ 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 JavaStdioEvaluator(CodeEvaluator): +class JavaStdioEvaluator(StdIOEvaluator): """Evaluates Java StdIO based code""" def setup(self): @@ -61,11 +60,10 @@ class JavaStdioEvaluator(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.user_output_path) else: err = "Compilation Error:" -- cgit