Added tests for Python function code generation