diff options
author | maheshgudi | 2018-07-04 17:07:01 +0530 |
---|---|---|
committer | maheshgudi | 2018-07-12 18:27:27 +0530 |
commit | ec0903e00ffab1f0f0e6e674637243cd6a548115 (patch) | |
tree | fcaefd1d2cd70cf9a04cde4bea33c9c1d05f5271 /yaksh | |
parent | 99f0c944fafec51b9327fe5dea01096842788e03 (diff) | |
download | online_test-ec0903e00ffab1f0f0e6e674637243cd6a548115.tar.gz online_test-ec0903e00ffab1f0f0e6e674637243cd6a548115.tar.bz2 online_test-ec0903e00ffab1f0f0e6e674637243cd6a548115.zip |
Make pep8 changes
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/cpp_stdio_evaluator.py | 1 | ||||
-rw-r--r-- | yaksh/error_messages.py | 2 | ||||
-rw-r--r-- | yaksh/evaluator_tests/test_c_cpp_evaluation.py | 3 | ||||
-rw-r--r-- | yaksh/grader.py | 1 |
4 files changed, 4 insertions, 3 deletions
diff --git a/yaksh/cpp_stdio_evaluator.py b/yaksh/cpp_stdio_evaluator.py index 26d655f..3f44cb2 100644 --- a/yaksh/cpp_stdio_evaluator.py +++ b/yaksh/cpp_stdio_evaluator.py @@ -9,6 +9,7 @@ from .stdio_evaluator import StdIOEvaluator from .file_utils import copy_files, delete_files from .grader import CompilationError + class CppStdIOEvaluator(StdIOEvaluator): """Evaluates C StdIO based code""" def __init__(self, metadata, test_case_data): diff --git a/yaksh/error_messages.py b/yaksh/error_messages.py index 86375bf..f34bf28 100644 --- a/yaksh/error_messages.py +++ b/yaksh/error_messages.py @@ -11,7 +11,7 @@ def prettify_exceptions(exception, message, traceback=None, "traceback": traceback, "message": message } - ignore_traceback = ['RuntimeError','RecursionError', + ignore_traceback = ['RuntimeError', 'RecursionError', "CompilationError", "TestCaseError" ] if exception in ignore_traceback: diff --git a/yaksh/evaluator_tests/test_c_cpp_evaluation.py b/yaksh/evaluator_tests/test_c_cpp_evaluation.py index 17f7c82..14ed808 100644 --- a/yaksh/evaluator_tests/test_c_cpp_evaluation.py +++ b/yaksh/evaluator_tests/test_c_cpp_evaluation.py @@ -106,7 +106,6 @@ class CAssertionEvaluationTestCases(EvaluatorBaseTest): for error in errors: self.assertEqual(error['exception'], 'AssertionError') - def test_compilation_error(self): # Given user_answer = "int add(int a, int b)\n{return a+b}" @@ -281,6 +280,7 @@ class CAssertionEvaluationTestCases(EvaluatorBaseTest): for error in errors: self.assertEqual(error['exception'], 'TestCaseError') + class CppStdIOEvaluationTestCases(EvaluatorBaseTest): def setUp(self): self.test_case_data = [{'expected_output': '11', @@ -439,7 +439,6 @@ class CppStdIOEvaluationTestCases(EvaluatorBaseTest): for error in errors: self.assertEqual(error['exception'], 'CompilationError') - def test_infinite_loop(self): # Given user_answer = dedent(""" diff --git a/yaksh/grader.py b/yaksh/grader.py index de8f897..c8356f3 100644 --- a/yaksh/grader.py +++ b/yaksh/grader.py @@ -30,6 +30,7 @@ class CompilationError(Exception): class TestCaseError(Exception): pass + @contextlib.contextmanager def change_dir(path): cur_dir = abspath(dirname(MY_DIR)) |