summaryrefslogtreecommitdiff
path: root/yaksh/python_stdio_evaluator.py
diff options
context:
space:
mode:
authorankitjavalkar2016-12-19 11:44:55 +0530
committerankitjavalkar2016-12-20 12:46:03 +0530
commitf1da39aded67efa3da145851f0e9f687a3e434e5 (patch)
treec8713233fcaaf50e7e4a62b337258e7932fcf99c /yaksh/python_stdio_evaluator.py
parent80a4feef3c209e044e8cbe31e44c81d69136e100 (diff)
downloadonline_test-f1da39aded67efa3da145851f0e9f687a3e434e5.tar.gz
online_test-f1da39aded67efa3da145851f0e9f687a3e434e5.tar.bz2
online_test-f1da39aded67efa3da145851f0e9f687a3e434e5.zip
Change all evaluator structure and make sure eval test cases pass
Diffstat (limited to 'yaksh/python_stdio_evaluator.py')
-rw-r--r--yaksh/python_stdio_evaluator.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/yaksh/python_stdio_evaluator.py b/yaksh/python_stdio_evaluator.py
index 7ef3a7c..991fd63 100644
--- a/yaksh/python_stdio_evaluator.py
+++ b/yaksh/python_stdio_evaluator.py
@@ -35,11 +35,6 @@ class PythonStdioEvaluator(BaseEvaluator):
# super(PythonStdioEvaluator, self).setup()
# self.files = []
- # def teardown(self):
- # # Delete the created file.
- # if self.files:
- # delete_files(self.files)
- # super(PythonStdioEvaluator, self).teardown()
def __init__(self, metadata, test_case_data):
self.files = []
@@ -53,6 +48,10 @@ class PythonStdioEvaluator(BaseEvaluator):
self.expected_output = test_case_data.get('expected_output')
self.weight = test_case_data.get('weight')
+ def teardown(self):
+ # Delete the created file.
+ if self.files:
+ delete_files(self.files)
def compile_code(self): # user_answer, file_paths, expected_input, expected_output, weight):
if self.file_paths: