From b515ee32315cc406a28549e3ba10d47d5e0e523b Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Fri, 30 Sep 2016 11:18:11 +0530 Subject: - Remove unused imports - Fix minor test case issues --- yaksh/bash_stdio_evaluator.py | 3 +-- yaksh/cpp_stdio_evaluator.py | 3 +-- yaksh/evaluator_tests/test_bash_evaluation.py | 6 +++--- yaksh/evaluator_tests/test_c_cpp_evaluation.py | 16 ++++++++-------- yaksh/evaluator_tests/test_java_evaluation.py | 8 ++++---- yaksh/evaluator_tests/test_python_evaluation.py | 0 yaksh/java_stdio_evaluator.py | 3 +-- yaksh/stdio_evaluator.py | 2 +- 8 files changed, 19 insertions(+), 22 deletions(-) mode change 100755 => 100644 yaksh/evaluator_tests/test_bash_evaluation.py mode change 100755 => 100644 yaksh/evaluator_tests/test_c_cpp_evaluation.py mode change 100755 => 100644 yaksh/evaluator_tests/test_java_evaluation.py mode change 100755 => 100644 yaksh/evaluator_tests/test_python_evaluation.py (limited to 'yaksh') diff --git a/yaksh/bash_stdio_evaluator.py b/yaksh/bash_stdio_evaluator.py index 8545ccb..e5e0da6 100644 --- a/yaksh/bash_stdio_evaluator.py +++ b/yaksh/bash_stdio_evaluator.py @@ -5,8 +5,7 @@ import os from os.path import isfile #local imports -from .code_evaluator import CodeEvaluator -from .stdio_evaluator import Evaluator +from .stdio_evaluator import StdIOEvaluator from .file_utils import copy_files, delete_files diff --git a/yaksh/cpp_stdio_evaluator.py b/yaksh/cpp_stdio_evaluator.py index d2fa281..9d2b969 100644 --- a/yaksh/cpp_stdio_evaluator.py +++ b/yaksh/cpp_stdio_evaluator.py @@ -5,8 +5,7 @@ import os from os.path import isfile #Local imports -from .code_evaluator import CodeEvaluator -from .stdio_evaluator import Evaluator +from .stdio_evaluator import StdIOEvaluator from .file_utils import copy_files, delete_files diff --git a/yaksh/evaluator_tests/test_bash_evaluation.py b/yaksh/evaluator_tests/test_bash_evaluation.py old mode 100755 new mode 100644 index 25fe18d..66ade19 --- a/yaksh/evaluator_tests/test_bash_evaluation.py +++ b/yaksh/evaluator_tests/test_bash_evaluation.py @@ -99,7 +99,7 @@ class BashStdioEvaluationTestCases(unittest.TestCase): "test_case_data": test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_array_input(self): @@ -119,7 +119,7 @@ class BashStdioEvaluationTestCases(unittest.TestCase): "test_case_data": test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_incorrect_answer(self): @@ -153,7 +153,7 @@ class BashStdioEvaluationTestCases(unittest.TestCase): "test_case_data": test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) if __name__ == '__main__': diff --git a/yaksh/evaluator_tests/test_c_cpp_evaluation.py b/yaksh/evaluator_tests/test_c_cpp_evaluation.py old mode 100755 new mode 100644 index b3551bf..c990436 --- a/yaksh/evaluator_tests/test_c_cpp_evaluation.py +++ b/yaksh/evaluator_tests/test_c_cpp_evaluation.py @@ -117,7 +117,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_array_input(self): @@ -137,7 +137,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_string_input(self): @@ -155,7 +155,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_incorrect_answer(self): @@ -219,7 +219,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_cpp_correct_answer(self): @@ -236,7 +236,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_cpp_array_input(self): @@ -257,7 +257,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_cpp_string_input(self): @@ -276,7 +276,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_cpp_incorrect_answer(self): @@ -344,7 +344,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) if __name__ == '__main__': diff --git a/yaksh/evaluator_tests/test_java_evaluation.py b/yaksh/evaluator_tests/test_java_evaluation.py old mode 100755 new mode 100644 index ebe05b8..5da66e0 --- a/yaksh/evaluator_tests/test_java_evaluation.py +++ b/yaksh/evaluator_tests/test_java_evaluation.py @@ -136,7 +136,7 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_array_input(self): @@ -158,7 +158,7 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_incorrect_answer(self): @@ -229,7 +229,7 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_string_input(self): @@ -249,7 +249,7 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) if __name__ == '__main__': diff --git a/yaksh/evaluator_tests/test_python_evaluation.py b/yaksh/evaluator_tests/test_python_evaluation.py old mode 100755 new mode 100644 diff --git a/yaksh/java_stdio_evaluator.py b/yaksh/java_stdio_evaluator.py index 3199885..bc9cf80 100644 --- a/yaksh/java_stdio_evaluator.py +++ b/yaksh/java_stdio_evaluator.py @@ -5,8 +5,7 @@ import os from os.path import isfile #Local imports -from .code_evaluator import CodeEvaluator -from .stdio_evaluator import Evaluator +from .stdio_evaluator import StdIOEvaluator from .file_utils import copy_files, delete_files diff --git a/yaksh/stdio_evaluator.py b/yaksh/stdio_evaluator.py index 326d2e7..7530b96 100644 --- a/yaksh/stdio_evaluator.py +++ b/yaksh/stdio_evaluator.py @@ -1,7 +1,7 @@ from __future__ import unicode_literals # Local imports -from code_evaluator import CodeEvaluator +from .code_evaluator import CodeEvaluator class StdIOEvaluator(CodeEvaluator): -- cgit