diff options
author | ankitjavalkar | 2015-05-12 17:35:16 +0530 |
---|---|---|
committer | ankitjavalkar | 2015-05-12 17:35:16 +0530 |
commit | 5b23647de575fd90552807260a4b8e0a96ab6afe (patch) | |
tree | 1c0c3f2e8605d6f36405c57cbe5de9a895a47958 /testapp/exam/python_code_evaluator.py | |
parent | 3e29dc7f6df7019562b179872b43cb13c7483738 (diff) | |
download | online_test-5b23647de575fd90552807260a4b8e0a96ab6afe.tar.gz online_test-5b23647de575fd90552807260a4b8e0a96ab6afe.tar.bz2 online_test-5b23647de575fd90552807260a4b8e0a96ab6afe.zip |
Seperated tests into seperate folder, formatting changes
Diffstat (limited to 'testapp/exam/python_code_evaluator.py')
-rw-r--r-- | testapp/exam/python_code_evaluator.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/testapp/exam/python_code_evaluator.py b/testapp/exam/python_code_evaluator.py index 61eee66..0c473cf 100644 --- a/testapp/exam/python_code_evaluator.py +++ b/testapp/exam/python_code_evaluator.py @@ -52,7 +52,10 @@ class PythonCodeEvaluator(CodeEvaluator): if test_case.get('kw_args') else "" args = pos_args + ", " + kw_args if pos_args and kw_args \ else pos_args or kw_args - tcode = "assert {0}({1}) == {2}".format(test_case.get('func_name'), - args, test_case.get('expected_answer')) + function_name = test_case.get('func_name') + expected_answer = test_case.get('expected_answer') + + tcode = "assert {0}({1}) == {2}".format(function_name, args, + expected_answer) test_code += tcode + "\n" return test_code |