diff options
author | ankitjavalkar | 2016-03-04 14:55:09 +0530 |
---|---|---|
committer | ankitjavalkar | 2016-05-05 18:57:52 +0530 |
commit | 3b56d8259d6aa8311f86e0561e40d0b17bc62534 (patch) | |
tree | 50e18e5f688fbeb195633073c36f9ce045d32e48 /yaksh/scilab_code_evaluator.py | |
parent | 5ec456d5208df78ef87d0660e4bef430d553d65d (diff) | |
download | online_test-3b56d8259d6aa8311f86e0561e40d0b17bc62534.tar.gz online_test-3b56d8259d6aa8311f86e0561e40d0b17bc62534.tar.bz2 online_test-3b56d8259d6aa8311f86e0561e40d0b17bc62534.zip |
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
Diffstat (limited to 'yaksh/scilab_code_evaluator.py')
-rw-r--r-- | yaksh/scilab_code_evaluator.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/yaksh/scilab_code_evaluator.py b/yaksh/scilab_code_evaluator.py index 392cd45..a8bd4cd 100644 --- a/yaksh/scilab_code_evaluator.py +++ b/yaksh/scilab_code_evaluator.py @@ -20,23 +20,22 @@ class ScilabCodeEvaluator(CodeEvaluator): # Removes all the commands that terminates scilab self.user_answer, self.terminate_commands = self._remove_scilab_exit(user_answer.lstrip()) - self.test_case_args = self._setup() + self.test_case_args = self.setup() - # Private Protocol ########## - def _setup(self): - super(ScilabCodeEvaluator, self)._setup() + def setup(self): + super(ScilabCodeEvaluator, 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('function.sci') return ref_path, # Return as a tuple - def _teardown(self): + def teardown(self): # Delete the created file. - super(ScilabCodeEvaluator, self)._teardown() + super(ScilabCodeEvaluator, self).teardown() os.remove(self.submit_path) - def _check_code(self, ref_path): + def check_code(self, ref_path): success = False # Throw message if there are commmands that terminates scilab |