summaryrefslogtreecommitdiff
path: root/yaksh/scilab_code_evaluator.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2018-06-07 16:14:37 +0530
committerGitHub2018-06-07 16:14:37 +0530
commit4eb754c2e71922819de7390d1b4993a21763de3e (patch)
treefede3f4250f3711d31da4bb7edd262edd0a90727 /yaksh/scilab_code_evaluator.py
parent78ce1804d3a82327aa0da1510bb5c03d6bbff3ba (diff)
parent93bb10eae5e1364ae6492f2534f0e7864c9c4254 (diff)
downloadonline_test-4eb754c2e71922819de7390d1b4993a21763de3e.tar.gz
online_test-4eb754c2e71922819de7390d1b4993a21763de3e.tar.bz2
online_test-4eb754c2e71922819de7390d1b4993a21763de3e.zip
Merge pull request #482 from adityacp/pep8_changes
Pep8 changes
Diffstat (limited to 'yaksh/scilab_code_evaluator.py')
-rw-r--r--yaksh/scilab_code_evaluator.py17
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
-