print("Error: Cannot find the return result of the sample code.")
else:
print("Error: Found %s result but %s python file."%
(len(sampre_begins),len(sampcd_begins)))
print(
"If you think the sample code of this api is not suitable for the return result, please add the white list in FIle: tools/wlist_return.json first. And you must have one TPM(saxon-zh or swtkiwi or Boyan-Liu) approve for the white list."
"Error: Your sample code have returned a result, but execute sample code don't get result!"
)
print(
"If you think the sample code of this api is not suitable for the return result, please add the white list in FIle: tools/wlist_return.json first. And you must have one TPM(saxon-zh or swtkiwi or Boyan-Liu) approve for the white list."
"Error: Mistake found in the return result of sample code."
)
print("There maybe three reasons for this error:")
print(
"1. The input of the sample code is a random number.Please add the white list in FIle: tools/return_white_list.txt first .And you must have one TPM(saxon-zh or swtkiwi or Boyan-Liu) approve for the white list."
)
print(
"2. The return value of the sample code is incorrect. Please check the code and reset the return value."
)
print(
"3. If you think the sample code of this api is not suitable for the return result, please add the white list in FIle: tools/wlist_return.json first. And you must have one TPM(saxon-zh or swtkiwi or Boyan-Liu) approve for the white list."
# the minimum indent, which is the indent of the first
# non-empty line
min_indent=check_indent(sampcd[0])
sampcd_to_write=[]
foriinrange(0,len(sampcd)):
cdline=sampcd[i]
# handle empty lines or those only with spaces/tabs
ifcdline.strip()=='':
continue
this_indent=check_indent(cdline)
ifthis_indent<min_indent:
break
else:
ifnamenotinwlist_return:
print_header(htype,hname)
print(
"Error: If you think the sample code of this api is not suitable for the return result, please add the white list in FIle: tools/wlist_return.json first. And you must have one TPM(saxon-zh or swtkiwi or Boyan-Liu) approve for the white list."