From 80a4feef3c209e044e8cbe31e44c81d69136e100 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 15 Dec 2016 16:34:18 +0530 Subject: Add further changes to code evaluator --- yaksh/evaluator_tests/test_python_evaluation.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'yaksh/evaluator_tests') diff --git a/yaksh/evaluator_tests/test_python_evaluation.py b/yaksh/evaluator_tests/test_python_evaluation.py index 688002f..4bf0032 100644 --- a/yaksh/evaluator_tests/test_python_evaluation.py +++ b/yaksh/evaluator_tests/test_python_evaluation.py @@ -263,7 +263,7 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): # Then self.assertFalse(result.get("success")) - self.assertEqual(3, len(err)) + self.assertEqual(9, len(err)) for msg in name_error_msg: self.assertIn(msg, result.get("error")) @@ -337,7 +337,7 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): # Then self.assertFalse(result.get("success")) - self.assertEqual(3, len(err)) + self.assertEqual(9, len(err)) for msg in type_error_msg: self.assertIn(msg, result.get("error")) @@ -377,7 +377,7 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): # Then self.assertFalse(result.get("success")) - self.assertEqual(4, len(err)) + self.assertEqual(9, len(err)) for msg in value_error_msg: self.assertIn(msg, result.get("error")) @@ -455,7 +455,7 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): # Then self.assertFalse(result.get("success")) - self.assertEqual(5, len(err)) + self.assertEqual(6, len(err)) for msg in syntax_error_msg: self.assertIn(msg, result.get("error")) @@ -476,9 +476,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): ] name_error_msg = ["Traceback", "call", - "File", - "line", - "", "NameError", "name 'S' is not defined" ] @@ -504,7 +501,7 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): # Then self.assertFalse(result.get("success")) - self.assertEqual(3, len(err)) + self.assertEqual(7, len(err)) for msg in name_error_msg: self.assertIn(msg, result.get("error")) -- cgit