summaryrefslogtreecommitdiff
path: root/yaksh/evaluator_tests/test_scilab_evaluation.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/evaluator_tests/test_scilab_evaluation.py')
-rw-r--r--yaksh/evaluator_tests/test_scilab_evaluation.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/yaksh/evaluator_tests/test_scilab_evaluation.py b/yaksh/evaluator_tests/test_scilab_evaluation.py
index d3f1dc8..b08d348 100644
--- a/yaksh/evaluator_tests/test_scilab_evaluation.py
+++ b/yaksh/evaluator_tests/test_scilab_evaluation.py
@@ -48,7 +48,7 @@ class ScilabEvaluationTestCases(EvaluatorBaseTest):
""")
self.test_case_data = [{"test_case": self.tc_data,
"test_case_type": "standardtestcase",
- "weight": 0.0
+ "weight": 0.0, 'hidden': True
}]
self.in_dir = tmp_in_dir_path
self.file_paths = None
@@ -92,9 +92,9 @@ 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.assertTrue(result.get("error")[0]['hidden'])
+ 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 +110,11 @@ 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.assertTrue(result.get("error")[0]['hidden'])
+ self.assert_correct_output("Message",
+ result.get('error')[0]["message"])
self.assertTrue(lines_of_error > 1)
def test_infinite_loop(self):