From 46ef4a4a563b16bb96d09cb17496afb731e616ad Mon Sep 17 00:00:00 2001 From: prathamesh Date: Wed, 1 Jul 2020 19:31:15 +0530 Subject: Modify tests to handle hidden tests --- yaksh/evaluator_tests/test_scilab_evaluation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'yaksh/evaluator_tests/test_scilab_evaluation.py') diff --git a/yaksh/evaluator_tests/test_scilab_evaluation.py b/yaksh/evaluator_tests/test_scilab_evaluation.py index 41abf94..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 @@ -93,6 +93,7 @@ class ScilabEvaluationTestCases(EvaluatorBaseTest): grader = Grader(self.in_dir) result = grader.evaluate(kwargs) self.assertFalse(result.get("success")) + self.assertTrue(result.get("error")[0]['hidden']) self.assert_correct_output('error', result.get("error")[0]['message']) def test_incorrect_answer(self): @@ -111,6 +112,7 @@ class ScilabEvaluationTestCases(EvaluatorBaseTest): result = grader.evaluate(kwargs) lines_of_error = len(result.get('error')[0]['message'].splitlines()) self.assertFalse(result.get('success')) + self.assertTrue(result.get("error")[0]['hidden']) self.assert_correct_output("Message", result.get('error')[0]["message"]) self.assertTrue(lines_of_error > 1) -- cgit