pytest 对比 unittest:
1、pytest 兼容 unittest,使用unittest写的用例,可以通过pytest去执行
2、pytest写用例更加简单
3、加载用例更加智能:
4、pytest可以对用例做分类管理,执行用例更加的灵活
5、unittest是python中的官方库,兼容性更好,更稳定,pytest在安装的时候,可能会出现和python版本的兼容问题。
6、pytest支持的插件非常丰富,功能扩展性强。
7、pytest用例执行的前置后置处理更加高级
pytest发现用例的规则