def getVarBlock(caller, args, returnParams): # split args (varBlockInnerArgs, argsVarsCommas, argsVarsList) = g.splitAndFullPrepare(args) # split return params (varBlockInnerReturnParams, returnParamsVarsCommas, returnParamsList) = g.splitAndFullPrepare(returnParams) returnParamsSplitedList = g.splitArgs(returnParams) # generate total var block # which consists of: # caller var # inner args vars # return args vars varBlockTmpl = """var ( \t{} {} {} )""" varBlock =varBlockTmpl.format(caller, varBlockInnerArgs, varBlockInnerReturnParams) print("argsVarsCommas") print(argsVarsCommas) return (varBlock, argsVarsCommas, returnParamsVarsCommas)
def test_testName(self): color.blue("test here baby") result = generateTestFileNameForGoTest.splitAndFullPrepare("int1 int, string2 *string") expected = ('\n\tint1 int\n\tstring2 *string', 'int1,string2', ['int1', 'string2']) assertMy.equals(result, expected)