diff options
author | mahesh | 2017-11-10 03:00:24 +0530 |
---|---|---|
committer | mahesh | 2017-11-10 03:00:24 +0530 |
commit | 8f3cd30a5fe553bc8aa701fc76ba8d2a55c4418f (patch) | |
tree | 79ba306e0dd23848e3f366d6b89a5f30aabea220 /yaksh/python_assertion_evaluator.py | |
parent | caf37373ec546d53db7caaf8aca9d5550d0ed4ad (diff) | |
download | online_test-8f3cd30a5fe553bc8aa701fc76ba8d2a55c4418f.tar.gz online_test-8f3cd30a5fe553bc8aa701fc76ba8d2a55c4418f.tar.bz2 online_test-8f3cd30a5fe553bc8aa701fc76ba8d2a55c4418f.zip |
No tracebacks if longer than 5 lines.
- Tracebacks with more than 5 lines will not be shown.
- Remove unnecessary imports.
- PEP8 change.
Diffstat (limited to 'yaksh/python_assertion_evaluator.py')
-rw-r--r-- | yaksh/python_assertion_evaluator.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/yaksh/python_assertion_evaluator.py b/yaksh/python_assertion_evaluator.py index 8c24e24..440f422 100644 --- a/yaksh/python_assertion_evaluator.py +++ b/yaksh/python_assertion_evaluator.py @@ -4,7 +4,6 @@ import traceback import os import re from os.path import join -from textwrap import dedent import importlib # Local imports @@ -70,7 +69,6 @@ class PythonAssertionEvaluator(BaseEvaluator): success = False mark_fraction = 0.0 try: - tb = None _tests = compile(self.test_case, '<string>', mode='exec') exec(_tests, self.exec_scope) except TimeoutException: @@ -89,5 +87,4 @@ class PythonAssertionEvaluator(BaseEvaluator): success = True err = None mark_fraction = 1.0 if self.partial_grading else 0.0 - del tb return success, err, mark_fraction |