diff options
author | Prabhu Ramachandran | 2016-09-29 12:33:08 +0530 |
---|---|---|
committer | GitHub | 2016-09-29 12:33:08 +0530 |
commit | 8b410d3764b8f0e5c7a14e292a5583ef93c4257e (patch) | |
tree | 18b9ca9a9dd202c61a83244337859fb4ba8b4e6c /yaksh/cpp_stdio_evaluator.py | |
parent | 8e4ead8ab4caa9366e5357840e1912cbfb8cdb85 (diff) | |
parent | 086620367c481009c9caed68660865ca127a9520 (diff) | |
download | online_test-8b410d3764b8f0e5c7a14e292a5583ef93c4257e.tar.gz online_test-8b410d3764b8f0e5c7a14e292a5583ef93c4257e.tar.bz2 online_test-8b410d3764b8f0e5c7a14e292a5583ef93c4257e.zip |
Merge pull request #141 from maheshgudi/refactor_stdio
Refactor stdio
Diffstat (limited to 'yaksh/cpp_stdio_evaluator.py')
-rw-r--r-- | yaksh/cpp_stdio_evaluator.py | 15 |
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:" |