From d3241512c71d61b355358a691d18e4ff8a8df34c Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Wed, 6 Apr 2016 11:26:52 +0530 Subject: Multiple test cases passed as dicts, check_code() is iterated based on no. of test cases --- yaksh/bash_code_evaluator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'yaksh/bash_code_evaluator.py') diff --git a/yaksh/bash_code_evaluator.py b/yaksh/bash_code_evaluator.py index fbfa232..b649af7 100644 --- a/yaksh/bash_code_evaluator.py +++ b/yaksh/bash_code_evaluator.py @@ -37,7 +37,7 @@ class BashCodeEvaluator(CodeEvaluator): super(BashCodeEvaluator, self).teardown() os.remove(self.submit_code_path) - def check_code(self, user_answer, test_case_data): + def check_code(self, user_answer, test_case): """ Function validates student script using instructor script as reference. Test cases can optionally be provided. The first argument ref_path, is the path to instructor script, it is assumed to @@ -60,7 +60,8 @@ class BashCodeEvaluator(CodeEvaluator): the required permissions are not given to the file(s). """ - ref_code_path = test_case_data[0] + # ref_code_path = test_case_data[0] + ref_code_path = test_case get_ref_path, get_test_case_path = ref_code_path.strip().split(',') get_ref_path = get_ref_path.strip() get_test_case_path = get_test_case_path.strip() -- cgit