diff options
author | prathamesh | 2020-06-30 08:36:18 +0530 |
---|---|---|
committer | prathamesh | 2020-06-30 08:36:18 +0530 |
commit | 60b1cc983c65654552c4b4a0d52114248ae0228f (patch) | |
tree | 57491da3f50eda30ccdbb827480e9021bd53f4e0 /yaksh/evaluator_tests/test_scilab_evaluation.py | |
parent | c27bc87afd68266da59af6e7f2b3b8cc8db13fad (diff) | |
download | online_test-60b1cc983c65654552c4b4a0d52114248ae0228f.tar.gz online_test-60b1cc983c65654552c4b4a0d52114248ae0228f.tar.bz2 online_test-60b1cc983c65654552c4b4a0d52114248ae0228f.zip |
Fix Tests
Diffstat (limited to 'yaksh/evaluator_tests/test_scilab_evaluation.py')
-rw-r--r-- | yaksh/evaluator_tests/test_scilab_evaluation.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/yaksh/evaluator_tests/test_scilab_evaluation.py b/yaksh/evaluator_tests/test_scilab_evaluation.py index d3f1dc8..41abf94 100644 --- a/yaksh/evaluator_tests/test_scilab_evaluation.py +++ b/yaksh/evaluator_tests/test_scilab_evaluation.py @@ -92,9 +92,8 @@ class ScilabEvaluationTestCases(EvaluatorBaseTest): grader = Grader(self.in_dir) result = grader.evaluate(kwargs) - self.assertFalse(result.get("success")) - self.assert_correct_output('error', result.get("error")) + self.assert_correct_output('error', result.get("error")[0]['message']) def test_incorrect_answer(self): user_answer = ("funcprot(0)\nfunction[c]=add(a,b)" @@ -110,10 +109,10 @@ class ScilabEvaluationTestCases(EvaluatorBaseTest): grader = Grader(self.in_dir) result = grader.evaluate(kwargs) - - lines_of_error = len(result.get('error')[0].splitlines()) + lines_of_error = len(result.get('error')[0]['message'].splitlines()) self.assertFalse(result.get('success')) - self.assert_correct_output("Message", result.get('error')) + self.assert_correct_output("Message", + result.get('error')[0]["message"]) self.assertTrue(lines_of_error > 1) def test_infinite_loop(self): |