对此方法重写

def mk_test_name(name, value, index=0):

重写前

index = "{0:0{1}}".format(index + 1, index_len)
if not is_trivial(value):
return "{0}_{1}".format(name, index)
try:
value = str(value)
except UnicodeEncodeError:
# fallback for python2
value = value.encode('ascii', 'backslashreplace')
test_name = "{0}_{1}_{2}".format(name, index, value)
return re.sub(r'\W|^(?=\d)', '_', test_name)

重写后

    # Add zeros before index to keep order
index = "{0:0{1}}".format(index + 1, index_len)
if not is_trivial(value):
if type(value) is dic and "api_name" in value.keys():
value=value["api_name"]
else:
return "{0}_{1}".format(name, index)
try:
value = str(value)
except UnicodeEncodeError:
# fallback for python2
value = value.encode('ascii', 'backslashreplace')
test_name = "{0}_{1}_{2}".format(name, index, value)
return re.sub(r'\W|^(?=\d)', '_', test_name)

重写效果:

最新文章

  1. asp.net配置web.config支持jQuery.Uploadify插件上传大文件
  2. UILabel实现自适应高宽
  3. Winform开发框架之读卡器和条码扫描枪的数据接收处理
  4. ASP.NET MVC4中使用Ninject
  5. 浅析C/C++ library
  6. Redis 配置文件 Redis.conf 参数说明
  7. mysql优化--博森瑞
  8. Raid1源代码分析--写流程
  9. 重写Collections实现自定义排序
  10. javascript:;”是什么意思
  11. 虚拟机Q&A
  12. SD卡的控制方法(指令集和控制时序)
  13. 配置虚拟主机(windows环境下nginx+php)
  14. redis 3.2 报错 Redis protected-mode 配置文件没有真正启动
  15. 现有n 个乱序数,都大于 1000 ,让取排行榜前十,时间复杂度为o(n), top10, 或者 topK,应用场景榜单Top:10,堆实现Top k
  16. 创建dblink
  17. Redis五种数据结构简介-2
  18. Ansible 远程执行命令
  19. 做一个完整的Java Web项目需要掌握的技能[转]
  20. JS学习笔记(5)--一道返回整数数组的面试题(经验之谈)

热门文章

  1. RS-232针脚(8 pin)
  2. openWRT自学---对官方的开发指导文档的解读和理解 记录1:编译一个package
  3. Maven项目Update Project...后JRE System Library会自动变回1.5解决办法
  4. HDU 5045 5047 5050 5053(上海网络赛E,F,I,L)
  5. 如何创建AnjularJS项目
  6. Pipeline outbound
  7. js apply / call 函数
  8. 跟我一起用Symfony写一个博客网站;
  9. Python: generator, yield, yield from 详解
  10. Django与Vue语法冲突问题完美解决方法