summaryrefslogtreecommitdiff
path: root/yaksh/evaluator_tests/test_c_cpp_evaluation.py
diff options
context:
space:
mode:
authoradityacp2017-06-12 18:24:01 +0530
committeradityacp2017-06-12 18:24:01 +0530
commit3552f4bc8082fc3ecc5290029cac6a839cd3b247 (patch)
treebb2014bed4c67f644932070611bcdb68eb234912 /yaksh/evaluator_tests/test_c_cpp_evaluation.py
parenta002ab59dbff856ee3838078cbe4f8fa439fd894 (diff)
parenteae6ee7ceb25f78b216a5e2c9d6165513272e4cb (diff)
downloadonline_test-3552f4bc8082fc3ecc5290029cac6a839cd3b247.tar.gz
online_test-3552f4bc8082fc3ecc5290029cac6a839cd3b247.tar.bz2
online_test-3552f4bc8082fc3ecc5290029cac6a839cd3b247.zip
Add latest changes after rebase
Diffstat (limited to 'yaksh/evaluator_tests/test_c_cpp_evaluation.py')
-rw-r--r--yaksh/evaluator_tests/test_c_cpp_evaluation.py14
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..5ff4e4c 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_line_numbers'))
+ result_error = result.get('error')[0].get('error_msg')
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_line_numbers'))
+ result_error = result.get('error')[0].get('error_msg')
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