diff options
author | adityacp | 2018-05-24 12:07:39 +0530 |
---|---|---|
committer | adityacp | 2018-06-07 14:50:47 +0530 |
commit | 97b657edc2a323f832c81f0e34ce5761bd21f7e9 (patch) | |
tree | 09f4367f813fab99ffa8cd540d246cfc8c8fa00a /yaksh/scilab_code_evaluator.py | |
parent | 78ce1804d3a82327aa0da1510bb5c03d6bbff3ba (diff) | |
download | online_test-97b657edc2a323f832c81f0e34ce5761bd21f7e9.tar.gz online_test-97b657edc2a323f832c81f0e34ce5761bd21f7e9.tar.bz2 online_test-97b657edc2a323f832c81f0e34ce5761bd21f7e9.zip |
Pep8 changes
Diffstat (limited to 'yaksh/scilab_code_evaluator.py')
-rw-r--r-- | yaksh/scilab_code_evaluator.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/yaksh/scilab_code_evaluator.py b/yaksh/scilab_code_evaluator.py index f5c81b5..9f26234 100644 --- a/yaksh/scilab_code_evaluator.py +++ b/yaksh/scilab_code_evaluator.py @@ -1,11 +1,8 @@ #!/usr/bin/env python from __future__ import unicode_literals -import traceback import os -from os.path import join, isfile import subprocess import re -import importlib # Local imports from .base_evaluator import BaseEvaluator @@ -41,8 +38,7 @@ class ScilabCodeEvaluator(BaseEvaluator): self.test_code_path = self.create_submit_code_file('main.sci') if self.file_paths: self.files = copy_files(self.file_paths) - ref_code_path = self.test_case - clean_ref_path, clean_test_case_path = self.test_code_path, None + clean_ref_path = self.test_code_path self.user_answer, terminate_commands = \ self._remove_scilab_exit(self.user_answer.lstrip()) @@ -61,12 +57,10 @@ class ScilabCodeEvaluator(BaseEvaluator): clean_ref_path ) cmd += ' | scilab-cli -nb' - ret = self._run_command(cmd, - shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE - ) - proc, stdout, stderr = ret + ret = self._run_command(cmd, shell=True, stdout=subprocess.PIPE, + stderr=subprocess.PIPE + ) + proc, stdout, stderr = ret # Get only the error. stderr = self._get_error(stdout) @@ -117,4 +111,3 @@ class ScilabCodeEvaluator(BaseEvaluator): if l.strip(): strip_out = strip_out+"\n"+l.strip() return strip_out - |