diff options
author | mahesh | 2017-05-17 12:26:06 +0530 |
---|---|---|
committer | mahesh | 2017-05-17 12:45:41 +0530 |
commit | 94f51e9c4286224057a404e48fad5069a4ed332c (patch) | |
tree | 03685a4e1b8104734d829ad58d22b83a9b3e93fe /yaksh/evaluator_tests/test_c_cpp_evaluation.py | |
parent | 6d8e1aa67381cd3b07e4ac89818af2a96ca05668 (diff) | |
download | online_test-94f51e9c4286224057a404e48fad5069a4ed332c.tar.gz online_test-94f51e9c4286224057a404e48fad5069a4ed332c.tar.bz2 online_test-94f51e9c4286224057a404e48fad5069a4ed332c.zip |
changed assertions for stdio test cases
Diffstat (limited to 'yaksh/evaluator_tests/test_c_cpp_evaluation.py')
-rw-r--r-- | yaksh/evaluator_tests/test_c_cpp_evaluation.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/yaksh/evaluator_tests/test_c_cpp_evaluation.py b/yaksh/evaluator_tests/test_c_cpp_evaluation.py index b15f766..46d5593 100644 --- a/yaksh/evaluator_tests/test_c_cpp_evaluation.py +++ b/yaksh/evaluator_tests/test_c_cpp_evaluation.py @@ -350,10 +350,11 @@ class CppStdIOEvaluationTestCases(EvaluatorBaseTest): result = grader.evaluate(kwargs) # Then - lines_of_error = len(result.get('error')[0].splitlines()) + lines_of_error = len(result.get('error')[0].get('error_no')) + result_error = result.get('error')[0].get('error') self.assertFalse(result.get('success')) - self.assert_correct_output("Incorrect", result.get('error')) - self.assertTrue(lines_of_error > 1) + self.assert_correct_output("Incorrect", result_error) + self.assertTrue(lines_of_error > 0) def test_error(self): # Given @@ -558,10 +559,11 @@ class CppStdIOEvaluationTestCases(EvaluatorBaseTest): result = grader.evaluate(kwargs) # Then - lines_of_error = len(result.get('error')[0].splitlines()) + lines_of_error = len(result.get('error')[0].get('error_no')) + result_error = result.get('error')[0].get('error') self.assertFalse(result.get('success')) - self.assert_correct_output("Incorrect", result.get('error')) - self.assertTrue(lines_of_error > 1) + self.assert_correct_output("Incorrect", result_error) + self.assertTrue(lines_of_error > 0) def test_cpp_error(self): # Given |