摘要: 前言 pytest测试框架的扩展能力 如果我们需要给pytest增加额外的扩展能力,那么有三种方式。 ①钩子函数 ②用例装饰器 ③命令行参数 ④编写pytest第三方扩展插件 实战 开发pytest-hello插件 1、新建 pytest_hello 文件,代码如下: # -*- encoding: 阅读全文
posted @ 2022-01-11 13:44 习久性成 阅读(587) 评论(0) 推荐(0)