summaryrefslogtreecommitdiff
path: root/yaksh/bash_stdio_evaluator.py
diff options
context:
space:
mode:
authorprathamesh2016-10-04 17:22:20 +0530
committerprathamesh2016-10-04 17:22:20 +0530
commit9c14e2b2026074234d9c977ca17b0c96b0789f6b (patch)
tree8b6c8e2438563e56631c2adf986e7cb16c33afb4 /yaksh/bash_stdio_evaluator.py
parentc5ae3d4589a71c3f3b9f622c7b67a04277269cde (diff)
parent91dd42214ba5ad88c5158b50a7746caa3841a883 (diff)
downloadonline_test-9c14e2b2026074234d9c977ca17b0c96b0789f6b.tar.gz
online_test-9c14e2b2026074234d9c977ca17b0c96b0789f6b.tar.bz2
online_test-9c14e2b2026074234d9c977ca17b0c96b0789f6b.zip
Merge branch 'master' of https://github.com/FOSSEE/online_test into edit_questionpaper
Resolved Conflicts: yaksh/views.py
Diffstat (limited to 'yaksh/bash_stdio_evaluator.py')
-rw-r--r--yaksh/bash_stdio_evaluator.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/yaksh/bash_stdio_evaluator.py b/yaksh/bash_stdio_evaluator.py
index 56f2e35..e5e0da6 100644
--- a/yaksh/bash_stdio_evaluator.py
+++ b/yaksh/bash_stdio_evaluator.py
@@ -1,14 +1,15 @@
#!/usr/bin/env python
+from __future__ import unicode_literals
import subprocess
import os
from os.path import isfile
#local imports
-from code_evaluator import CodeEvaluator
-from stdio_evaluator import Evaluator
-from file_utils import copy_files, delete_files
+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 +42,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