From 0580f99fecc0bb495beb5706e18246834174710b Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Tue, 21 Apr 2015 18:15:10 +0530 Subject: Add code checker registration class --- testapp/exam/evaluate_python.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'testapp/exam/evaluate_python.py') diff --git a/testapp/exam/evaluate_python.py b/testapp/exam/evaluate_python.py index 78d6fdf..18fde43 100644 --- a/testapp/exam/evaluate_python.py +++ b/testapp/exam/evaluate_python.py @@ -7,6 +7,7 @@ import importlib # local imports from code_server import TestCode +from registry import registry class EvaluatePython(TestCode): """Tests the Python code obtained from Code Server""" @@ -49,4 +50,6 @@ class EvaluatePython(TestCode): tcode = "assert {0}({1}) == {2}" \ .format(test_case.get('func_name'), args, test_case.get('expected_answer')) test_code += tcode + "\n" - return test_code \ No newline at end of file + return test_code + +registry.register('python', evaluate_python, EvaluatePython) \ No newline at end of file -- cgit