summaryrefslogtreecommitdiff
path: root/yaksh/code_evaluator.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2016-09-18 10:06:39 +0530
committerGitHub2016-09-18 10:06:39 +0530
commitf78647307f2e5f858d1c1f74507a8626ec117223 (patch)
tree245f8f5af7ed23dc442d8809ad65390184f4121e /yaksh/code_evaluator.py
parent5b2a6fe665a3add0916a255e5436841b820146ee (diff)
parenta46ef7b800b18b95a533022bd4ef2afb7681104b (diff)
downloadonline_test-f78647307f2e5f858d1c1f74507a8626ec117223.tar.gz
online_test-f78647307f2e5f858d1c1f74507a8626ec117223.tar.bz2
online_test-f78647307f2e5f858d1c1f74507a8626ec117223.zip
Merge pull request #138 from maheshgudi/python_assertion_bug_fix
Python assertion bug fix
Diffstat (limited to 'yaksh/code_evaluator.py')
-rw-r--r--yaksh/code_evaluator.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/yaksh/code_evaluator.py b/yaksh/code_evaluator.py
index e139b55..8a9b7a6 100644
--- a/yaksh/code_evaluator.py
+++ b/yaksh/code_evaluator.py
@@ -101,6 +101,7 @@ class CodeEvaluator(object):
# Do whatever testing needed.
try:
for test_case in test_case_data:
+ success = False
self.compile_code(user_answer, file_paths, **test_case)
success, err = self.check_code(user_answer, file_paths, **test_case)
if not success:
@@ -116,8 +117,6 @@ class CodeEvaluator(object):
tb_list = traceback.format_exception(exc_type, exc_value, exc_tb)
if len(tb_list) > 2:
del tb_list[1:3]
- else:
- pass
err = "Error: {0}".format("".join(tb_list))
finally:
# Set back any original signal handler.