diff options
author | maheshgudi | 2018-04-06 15:07:26 +0530 |
---|---|---|
committer | maheshgudi | 2018-04-06 16:20:10 +0530 |
commit | 97e6372b344f02c541e443afde5ba468506bccd8 (patch) | |
tree | a9e929c6cc397e6c501507810d46ec607d966d35 /yaksh/grader.py | |
parent | 895102248fedae4dded163bfc8db0bb452f5bb6c (diff) | |
download | online_test-97e6372b344f02c541e443afde5ba468506bccd8.tar.gz online_test-97e6372b344f02c541e443afde5ba468506bccd8.tar.bz2 online_test-97e6372b344f02c541e443afde5ba468506bccd8.zip |
Fix a bug that allows answer to be true if there are no test cases to a code question
Diffstat (limited to 'yaksh/grader.py')
-rw-r--r-- | yaksh/grader.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yaksh/grader.py b/yaksh/grader.py index 38cce8d..eede4d6 100644 --- a/yaksh/grader.py +++ b/yaksh/grader.py @@ -131,7 +131,10 @@ class Grader(object): # Add a new signal handler for the execution of this code. prev_handler = create_signal_handler() success = False - test_case_success_status = [False] * len(test_case_instances) + if len(test_case_instances) != 0: + test_case_success_status = [False] * len(test_case_instances) + else: + test_case_success_status = [False] error = [] weight = 0.0 |