diff options
author | ankitjavalkar | 2016-12-15 16:34:18 +0530 |
---|---|---|
committer | ankitjavalkar | 2016-12-20 12:46:02 +0530 |
commit | 80a4feef3c209e044e8cbe31e44c81d69136e100 (patch) | |
tree | dcf262436bbe7ada8dc43638ac1769238c30bac9 /yaksh/evaluator_tests | |
parent | b59e11188609ef10150f76d75f75882f8ae20269 (diff) | |
download | online_test-80a4feef3c209e044e8cbe31e44c81d69136e100.tar.gz online_test-80a4feef3c209e044e8cbe31e44c81d69136e100.tar.bz2 online_test-80a4feef3c209e044e8cbe31e44c81d69136e100.zip |
Add further changes to code evaluator
Diffstat (limited to 'yaksh/evaluator_tests')
-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 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", - "<string>", "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")) |