diff options
author | maheshgudi | 2016-11-18 16:30:36 +0530 |
---|---|---|
committer | maheshgudi | 2016-11-18 16:30:36 +0530 |
commit | 2cb22a95912e6fe6bf97046de654207e4f265d8c (patch) | |
tree | 6054de2d9a2b7214eb9c20ba7e09a592fbc2484f /yaksh/evaluator_tests/test_python_evaluation.py | |
parent | 8db94931bfd2fd0bab9e3b1bf0fc6d4aeb7b9274 (diff) | |
download | online_test-2cb22a95912e6fe6bf97046de654207e4f265d8c.tar.gz online_test-2cb22a95912e6fe6bf97046de654207e4f265d8c.tar.bz2 online_test-2cb22a95912e6fe6bf97046de654207e4f265d8c.zip |
fixed test cases and added timeout exception in python assertion
Diffstat (limited to 'yaksh/evaluator_tests/test_python_evaluation.py')
-rw-r--r-- | yaksh/evaluator_tests/test_python_evaluation.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/yaksh/evaluator_tests/test_python_evaluation.py b/yaksh/evaluator_tests/test_python_evaluation.py index 9796fa2..acf5d0a 100644 --- a/yaksh/evaluator_tests/test_python_evaluation.py +++ b/yaksh/evaluator_tests/test_python_evaluation.py @@ -200,7 +200,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")) @@ -254,7 +254,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")) @@ -284,7 +284,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")) @@ -341,7 +341,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")) @@ -360,9 +360,6 @@ class PythonAssertionEvaluationTestCases(unittest.TestCase): ] name_error_msg = ["Traceback", "call", - "File", - "line", - "<string>", "NameError", "name 'S' is not defined" ] @@ -379,7 +376,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")) |