From 908797ed67fba67bbc40eae7bb8b85381b3e5141 Mon Sep 17 00:00:00 2001 From: adityacp Date: Mon, 17 Oct 2016 12:59:34 +0530 Subject: changes in evaluator and file utils --- yaksh/bash_stdio_evaluator.py | 2 +- yaksh/file_utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'yaksh') diff --git a/yaksh/bash_stdio_evaluator.py b/yaksh/bash_stdio_evaluator.py index e5e0da6..a7ea1a4 100644 --- a/yaksh/bash_stdio_evaluator.py +++ b/yaksh/bash_stdio_evaluator.py @@ -17,10 +17,10 @@ class BashStdioEvaluator(StdIOEvaluator): self.submit_code_path = self.create_submit_code_file('Test.sh') def teardown(self): - super(BashStdioEvaluator, self).teardown() os.remove(self.submit_code_path) if self.files: delete_files(self.files) + super(BashStdioEvaluator, self).teardown() def compile_code(self, user_answer, file_paths, expected_input, expected_output): self.files = [] diff --git a/yaksh/file_utils.py b/yaksh/file_utils.py index ba3ead0..f41c531 100644 --- a/yaksh/file_utils.py +++ b/yaksh/file_utils.py @@ -2,7 +2,7 @@ import shutil import os import zipfile import tempfile -from online_test.settings import OUTPUT_DIR + def copy_files(file_paths): """ Copy Files to current directory, takes @@ -15,7 +15,7 @@ def copy_files(file_paths): files.append(file_name) shutil.copy(file_path, os.getcwd()) if extract: - z_files, path = extract_files(file_name, OUTPUT_DIR) + z_files, path = extract_files(file_name, os.getcwd()) for file in z_files: files.append(file) return files -- cgit