From 17752a69114e7dbad266337e768013920aec8c0c Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 23 Apr 2015 19:32:37 +0530 Subject: Code Review: Code refactoring - Add from_json classmethod - Question language is passed directly to the code server - Fix errors in evaluation of code - Fix test cases --- testapp/exam/evaluate_python.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'testapp/exam/evaluate_python.py') diff --git a/testapp/exam/evaluate_python.py b/testapp/exam/evaluate_python.py index 18fde43..3af82b6 100644 --- a/testapp/exam/evaluate_python.py +++ b/testapp/exam/evaluate_python.py @@ -6,7 +6,7 @@ from os.path import join import importlib # local imports -from code_server import TestCode +from test_code import TestCode from registry import registry class EvaluatePython(TestCode): @@ -36,6 +36,7 @@ class EvaluatePython(TestCode): del tb return success, err + # Private Protocol def _create_test_case(self): """ Create assert based test cases in python @@ -52,4 +53,4 @@ class EvaluatePython(TestCode): test_code += tcode + "\n" return test_code -registry.register('python', evaluate_python, EvaluatePython) \ No newline at end of file +registry.register('python', EvaluatePython) \ No newline at end of file -- cgit