嗨,有人可以请教,
我有两个函数:new_TestStep
和set_Result
函数new_TestStep
返回一个元组(不必是元组,只要可以工作就可以是任何东西)
函数set_Result
仅需使用函数new_TestStep: step_number
def new_TestStep(step_number, operation, expected_result):
print ('Test Step "{}",\nOperation: "{}",\nExpected Result: "{}'.format(step_number, operation, expected_result))
return (step_number, operation, expected_result)
def set_Result(result):
if result > 0:
print('Step {} PASS'.format(step_number))
return "PASS"
else:
print('Step {} FAIL'.format(step_number))
return "PASS"