From 6c0f1a9182f53d4340ef2324ae93c50872a83a10 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Tue, 27 Sep 2016 14:27:18 +0530 Subject: modified test cases wrt the refactor changes --- yaksh/evaluator_tests/test_bash_evaluation.py | 6 +++--- yaksh/evaluator_tests/test_c_cpp_evaluation.py | 17 ++++++++--------- yaksh/evaluator_tests/test_java_evaluation.py | 8 ++++---- yaksh/evaluator_tests/test_python_evaluation.py | 14 +++++++------- 4 files changed, 22 insertions(+), 23 deletions(-) mode change 100644 => 100755 yaksh/evaluator_tests/test_bash_evaluation.py mode change 100644 => 100755 yaksh/evaluator_tests/test_c_cpp_evaluation.py mode change 100644 => 100755 yaksh/evaluator_tests/test_java_evaluation.py mode change 100644 => 100755 yaksh/evaluator_tests/test_python_evaluation.py (limited to 'yaksh/evaluator_tests') diff --git a/yaksh/evaluator_tests/test_bash_evaluation.py b/yaksh/evaluator_tests/test_bash_evaluation.py old mode 100644 new mode 100755 index addc5e6..084e5e4 --- a/yaksh/evaluator_tests/test_bash_evaluation.py +++ b/yaksh/evaluator_tests/test_bash_evaluation.py @@ -88,7 +88,7 @@ class BashStdioEvaluationTestCases(unittest.TestCase): "test_case_data": test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_array_input(self): @@ -108,7 +108,7 @@ class BashStdioEvaluationTestCases(unittest.TestCase): "test_case_data": test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_incorrect_answer(self): @@ -142,7 +142,7 @@ class BashStdioEvaluationTestCases(unittest.TestCase): "test_case_data": test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(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 100644 new mode 100755 index 0042d0f..c6994f6 --- a/yaksh/evaluator_tests/test_c_cpp_evaluation.py +++ b/yaksh/evaluator_tests/test_c_cpp_evaluation.py @@ -84,7 +84,6 @@ class CAssertionEvaluationTestCases(unittest.TestCase): self.assertTrue(result.get('success')) self.assertEquals(result.get('error'), "Correct answer") - class CppStdioEvaluationTestCases(unittest.TestCase): def setUp(self): @@ -107,7 +106,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_array_input(self): @@ -127,7 +126,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_string_input(self): @@ -145,7 +144,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_incorrect_answer(self): @@ -208,7 +207,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_cpp_correct_answer(self): @@ -225,7 +224,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_cpp_array_input(self): @@ -246,7 +245,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_cpp_string_input(self): @@ -265,7 +264,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_cpp_incorrect_answer(self): @@ -332,7 +331,7 @@ class CppStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(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 100644 new mode 100755 index 74ac677..60afb3b --- a/yaksh/evaluator_tests/test_java_evaluation.py +++ b/yaksh/evaluator_tests/test_java_evaluation.py @@ -127,7 +127,7 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_array_input(self): @@ -149,7 +149,7 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_incorrect_answer(self): @@ -219,7 +219,7 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_string_input(self): @@ -239,7 +239,7 @@ class JavaStdioEvaluationTestCases(unittest.TestCase): 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) - self.assertEquals(result.get('error'), "Correct Answer") + self.assertEquals(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 100644 new mode 100755 index 2a109d5..b72d26b --- a/yaksh/evaluator_tests/test_python_evaluation.py +++ b/yaksh/evaluator_tests/test_python_evaluation.py @@ -344,7 +344,7 @@ class PythonStdoutEvaluationTestCases(unittest.TestCase): result = evaluator.evaluate(**kwargs) # Then - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) def test_incorrect_answer(self): @@ -360,7 +360,7 @@ class PythonStdoutEvaluationTestCases(unittest.TestCase): # Then self.assertFalse(result.get('success')) - self.assertIn("Incorrect Answer", result.get('error')) + self.assertIn("Incorrect answer", result.get('error')) def test_infinite_loop(self): # Given @@ -404,7 +404,7 @@ class PythonStdIOEvaluationTestCases(unittest.TestCase): # Then self.assertTrue(result.get('success')) - self.assertIn("Correct Answer", result.get('error')) + self.assertIn("Correct answer", result.get('error')) def test_correct_answer_list(self): # Given @@ -427,7 +427,7 @@ class PythonStdIOEvaluationTestCases(unittest.TestCase): # Then self.assertTrue(result.get('success')) - self.assertIn("Correct Answer", result.get('error')) + self.assertIn("Correct answer", result.get('error')) def test_correct_answer_string(self): # Given @@ -451,7 +451,7 @@ class PythonStdIOEvaluationTestCases(unittest.TestCase): # Then self.assertTrue(result.get('success')) - self.assertIn("Correct Answer", result.get('error')) + self.assertIn("Correct answer", result.get('error')) def test_incorrect_answer_integer(self): # Given @@ -474,7 +474,7 @@ class PythonStdIOEvaluationTestCases(unittest.TestCase): # Then self.assertFalse(result.get('success')) - self.assertIn("Incorrect Answer", result.get('error')) + self.assertIn("Incorrect answer", result.get('error')) def test_file_based_answer(self): # Given @@ -497,7 +497,7 @@ class PythonStdIOEvaluationTestCases(unittest.TestCase): result = evaluator.evaluate(**kwargs) # Then - self.assertEqual(result.get('error'), "Correct Answer") + self.assertEqual(result.get('error'), "Correct answer") self.assertTrue(result.get('success')) if __name__ == '__main__': -- cgit