summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabhu Ramachandran2017-02-01 22:29:03 +0530
committerPrabhu Ramachandran2017-02-01 22:29:03 +0530
commit62851feb0e7e9b1ee6c8c0b45ec96db6134cb645 (patch)
tree1af82dfd095bf68b256e9517c8964a0cab831db8
parent6012f3d3684a55bbef6a583453d5c17bdf843d68 (diff)
downloadonline_test-62851feb0e7e9b1ee6c8c0b45ec96db6134cb645.tar.gz
online_test-62851feb0e7e9b1ee6c8c0b45ec96db6134cb645.tar.bz2
online_test-62851feb0e7e9b1ee6c8c0b45ec96db6134cb645.zip
Update test to work with fix.
-rw-r--r--yaksh/evaluator_tests/test_python_evaluation.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/yaksh/evaluator_tests/test_python_evaluation.py b/yaksh/evaluator_tests/test_python_evaluation.py
index 1fba73e..82cf4c3 100644
--- a/yaksh/evaluator_tests/test_python_evaluation.py
+++ b/yaksh/evaluator_tests/test_python_evaluation.py
@@ -400,7 +400,7 @@ class PythonAssertionEvaluationTestCases(EvaluatorBaseTest):
result = grader.evaluate(kwargs)
error_as_str = ''.join(result.get("error"))
err = error_as_str.splitlines()
-
+
# Then
self.assertFalse(result.get("success"))
self.assertEqual(5, len(err))
@@ -578,7 +578,10 @@ class PythonStdIOEvaluationTestCases(EvaluatorBaseTest):
# Then
self.assertFalse(result.get('success'))
- self.assert_correct_output("Incorrect answer", result.get('error'))
+ self.assert_correct_output(
+ "ERROR:\nExpected:\n3\nGiven:\n-1\n\nError in line 1 of output.",
+ result.get('error')
+ )
def test_file_based_answer(self):
# Given
@@ -728,7 +731,7 @@ class PythonHookEvaluationTestCases(EvaluatorBaseTest):
# Then
self.assertFalse(result.get('success'))
self.assert_correct_output('Incorrect Answer', result.get('error'))
-
+
def test_assert_with_hook(self):
# Given
user_answer = "def add(a,b):\n\treturn a + b"
@@ -815,7 +818,7 @@ class PythonHookEvaluationTestCases(EvaluatorBaseTest):
# Then
self.assertTrue(result.get('success'))
self.assertEqual(result.get("weight"), 1.5)
-
+
def test_infinite_loop(self):
# Given
user_answer = "def add(a, b):\n\twhile True:\n\t\tpass"