summaryrefslogtreecommitdiff
path: root/yaksh/grader.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2018-04-06 17:32:15 +0530
committerGitHub2018-04-06 17:32:15 +0530
commita7b0c232991208625564f76a56d078e9391c5cb2 (patch)
tree1a35de41c7d71fb8f49eb0b12328763502668752 /yaksh/grader.py
parent895102248fedae4dded163bfc8db0bb452f5bb6c (diff)
parent7f04851ccbb4d8b541a3ed38aa13cff36b6e898c (diff)
downloadonline_test-a7b0c232991208625564f76a56d078e9391c5cb2.tar.gz
online_test-a7b0c232991208625564f76a56d078e9391c5cb2.tar.bz2
online_test-a7b0c232991208625564f76a56d078e9391c5cb2.zip
Merge pull request #472 from maheshgudi/fix_no_testcase_bug
Correct answer for no test cases bug fix.
Diffstat (limited to 'yaksh/grader.py')
-rw-r--r--yaksh/grader.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yaksh/grader.py b/yaksh/grader.py
index 38cce8d..c9dc8a2 100644
--- a/yaksh/grader.py
+++ b/yaksh/grader.py
@@ -131,7 +131,9 @@ 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)
+ test_case_success_status = [False]
+ if len(test_case_instances) != 0:
+ test_case_success_status = [False] * len(test_case_instances)
error = []
weight = 0.0