From 62851feb0e7e9b1ee6c8c0b45ec96db6134cb645 Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Wed, 1 Feb 2017 22:29:03 +0530 Subject: Update test to work with fix. --- yaksh/evaluator_tests/test_python_evaluation.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'yaksh') diff --git a/yaksh/evaluator_tests/test_python_evaluation.py b/yaksh/evaluator_tests/test_python_evaluation.py index 1fba73e..82cf4c3 100644 --- a/yaksh/evaluator_tests/test_python_evaluation.py +++ b/yaksh/evaluator_tests/test_python_evaluation.py @@ -400,7 +400,7 @@ class PythonAssertionEvaluationTestCases(EvaluatorBaseTest): result = grader.evaluate(kwargs) error_as_str = ''.join(result.get("error")) err = error_as_str.splitlines() - + # Then self.assertFalse(result.get("success")) self.assertEqual(5, len(err)) @@ -578,7 +578,10 @@ class PythonStdIOEvaluationTestCases(EvaluatorBaseTest): # Then self.assertFalse(result.get('success')) - self.assert_correct_output("Incorrect answer", result.get('error')) + self.assert_correct_output( + "ERROR:\nExpected:\n3\nGiven:\n-1\n\nError in line 1 of output.", + result.get('error') + ) def test_file_based_answer(self): # Given @@ -728,7 +731,7 @@ class PythonHookEvaluationTestCases(EvaluatorBaseTest): # Then self.assertFalse(result.get('success')) self.assert_correct_output('Incorrect Answer', result.get('error')) - + def test_assert_with_hook(self): # Given user_answer = "def add(a,b):\n\treturn a + b" @@ -815,7 +818,7 @@ class PythonHookEvaluationTestCases(EvaluatorBaseTest): # Then self.assertTrue(result.get('success')) self.assertEqual(result.get("weight"), 1.5) - + def test_infinite_loop(self): # Given user_answer = "def add(a, b):\n\twhile True:\n\t\tpass" -- cgit