diff options
author | ankitjavalkar | 2016-04-06 11:26:52 +0530 |
---|---|---|
committer | ankitjavalkar | 2016-05-05 19:16:26 +0530 |
commit | d3241512c71d61b355358a691d18e4ff8a8df34c (patch) | |
tree | 0d1810fab8a10b7671400dab64a8b877b334a676 /yaksh/evaluator_tests/test_c_cpp_evaluation.py | |
parent | f120f5763904589d3c18b6cc0f4e227bcaef9a0a (diff) | |
download | online_test-d3241512c71d61b355358a691d18e4ff8a8df34c.tar.gz online_test-d3241512c71d61b355358a691d18e4ff8a8df34c.tar.bz2 online_test-d3241512c71d61b355358a691d18e4ff8a8df34c.zip |
Multiple test cases passed as dicts, check_code() is iterated based on no. of test cases
Diffstat (limited to 'yaksh/evaluator_tests/test_c_cpp_evaluation.py')
-rw-r--r-- | yaksh/evaluator_tests/test_c_cpp_evaluation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yaksh/evaluator_tests/test_c_cpp_evaluation.py b/yaksh/evaluator_tests/test_c_cpp_evaluation.py index 9d37fb4..a07150d 100644 --- a/yaksh/evaluator_tests/test_c_cpp_evaluation.py +++ b/yaksh/evaluator_tests/test_c_cpp_evaluation.py @@ -5,7 +5,7 @@ from yaksh.settings import SERVER_TIMEOUT class CEvaluationTestCases(unittest.TestCase): def setUp(self): - self.test_case_data = ["c_cpp_files/main.cpp"] + self.test_case_data = [{"test_case": "c_cpp_files/main.cpp"}] self.in_dir = "/tmp" self.timeout_msg = ("Code took more than {0} seconds to run. " "You probably have an infinite loop in your code.").format(SERVER_TIMEOUT) @@ -23,7 +23,7 @@ class CEvaluationTestCases(unittest.TestCase): def test_incorrect_answer(self): user_answer = "int add(int a, int b)\n{return a-b;}" get_class = CppCodeEvaluator(self.in_dir) - kwargs = {'user_answer': user_answer, + kwargs = {'user_answer': user_answer, 'test_case_data': self.test_case_data } result = get_class.evaluate(**kwargs) |