From 8f3cd30a5fe553bc8aa701fc76ba8d2a55c4418f Mon Sep 17 00:00:00 2001 From: mahesh Date: Fri, 10 Nov 2017 03:00:24 +0530 Subject: No tracebacks if longer than 5 lines. - Tracebacks with more than 5 lines will not be shown. - Remove unnecessary imports. - PEP8 change. --- yaksh/python_assertion_evaluator.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'yaksh/python_assertion_evaluator.py') 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, '', 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 -- cgit