diff options
author | Prabhu Ramachandran | 2016-10-04 15:44:05 +0530 |
---|---|---|
committer | GitHub | 2016-10-04 15:44:05 +0530 |
commit | 91dd42214ba5ad88c5158b50a7746caa3841a883 (patch) | |
tree | 188f8aa284783e844eccffe350839d6a18f4da8b /yaksh/scilab_code_evaluator.py | |
parent | 6b08e56fe3cf70ffbcbd1ed432dde25babe48148 (diff) | |
parent | 59fa975a9fd0f6728cf62b1069abecac95a77b68 (diff) | |
download | online_test-91dd42214ba5ad88c5158b50a7746caa3841a883.tar.gz online_test-91dd42214ba5ad88c5158b50a7746caa3841a883.tar.bz2 online_test-91dd42214ba5ad88c5158b50a7746caa3841a883.zip |
Merge pull request #143 from adityacp/python2to3-migrate
Migration Python 2 to 3
Diffstat (limited to 'yaksh/scilab_code_evaluator.py')
-rw-r--r-- | yaksh/scilab_code_evaluator.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/yaksh/scilab_code_evaluator.py b/yaksh/scilab_code_evaluator.py index 53fa343..915491c 100644 --- a/yaksh/scilab_code_evaluator.py +++ b/yaksh/scilab_code_evaluator.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import unicode_literals import traceback import os from os.path import join, isfile @@ -6,9 +7,9 @@ import subprocess import re import importlib -# local imports -from code_evaluator import CodeEvaluator -from file_utils import copy_files, delete_files +# Local imports +from .code_evaluator import CodeEvaluator +from .file_utils import copy_files, delete_files class ScilabCodeEvaluator(CodeEvaluator): @@ -19,11 +20,11 @@ class ScilabCodeEvaluator(CodeEvaluator): self.create_submit_code_file('function.sci') def teardown(self): - super(ScilabCodeEvaluator, self).teardown() # Delete the created file. os.remove(self.submit_code_path) if self.files: delete_files(self.files) + super(ScilabCodeEvaluator, self).teardown() def check_code(self, user_answer, file_paths, test_case): self.files = [] |