def test_infinite_loop(self):
        user_answer = "funcprot(0)\nfunction[c]=add(a,b)\n\tc=a;\nwhile(1==1)\nend\nendfunction"
        get_class = ScilabCodeEvaluator(self.test_case_data, self.test,
                                         self.language, user_answer,
                                         self.ref_code_path, self.in_dir)
        result = get_class.evaluate()

        self.assertFalse(result.get("success"))
        self.assertEquals(result.get("error"), self.timeout_msg)
    def test_error(self):
        user_answer = "funcprot(0)\nfunction[c]=add(a,b)\n\tc=a+b;\ndis(\tendfunction"
        get_class = ScilabCodeEvaluator(self.test_case_data, self.test,
                                             self.language, user_answer,
                                             self.ref_code_path, self.in_dir)
        result = get_class.evaluate()
 
        self.assertFalse(result.get("success"))
        self.assertTrue("error" in result.get("error"))