From 3b56d8259d6aa8311f86e0561e40d0b17bc62534 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Fri, 4 Mar 2016 14:55:09 +0530 Subject: Language registry altered, Name cleanup: - set_registry will only act when registry is None - _setup, _teardown and _check_code are setup,teardown,check_code - Corresponding name changes in evaluator modules --- yaksh/java_code_evaluator.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'yaksh/java_code_evaluator.py') diff --git a/yaksh/java_code_evaluator.py b/yaksh/java_code_evaluator.py index 4367259..6f39d71 100644 --- a/yaksh/java_code_evaluator.py +++ b/yaksh/java_code_evaluator.py @@ -17,11 +17,10 @@ class JavaCodeEvaluator(CodeEvaluator): super(JavaCodeEvaluator, self).__init__(test_case_data, test, language, user_answer, ref_code_path, in_dir) - self.test_case_args = self._setup() + self.test_case_args = self.setup() - # Private Protocol ########## - def _setup(self): - super(JavaCodeEvaluator, self)._setup() + def setup(self): + super(JavaCodeEvaluator, self).setup() ref_path, test_case_path = self._set_test_code_file_path(self.ref_code_path) self.submit_path = self.create_submit_code_file('Test.java') @@ -46,12 +45,12 @@ class JavaCodeEvaluator(CodeEvaluator): return (ref_path, self.submit_path, compile_command, compile_main, run_command_args, remove_user_output, remove_ref_output) - def _teardown(self): + def teardown(self): # Delete the created file. - super(JavaCodeEvaluator, self)._teardown() + super(JavaCodeEvaluator, self).teardown() os.remove(self.submit_path) - def _check_code(self, ref_code_path, submit_code_path, compile_command, + def check_code(self, ref_code_path, submit_code_path, compile_command, compile_main, run_command_args, remove_user_output, remove_ref_output): """ Function validates student code using instructor code as -- cgit