摘要:
pytest 的钩子函数有很多,通过钩子函数的学习可以了解到pytest在执行用例的每个阶段做什么事情,也方便后续对pytest二次开发学习。详细文档可以查看pytest官方文档https://docs.pytest.org/en/latest/reference.html#hooks 钩子函数总结 阅读全文
摘要:
之前花了很多篇幅来介绍 pluggy 这个插件框架。核心原因就是因为其实 pytest 是一个完全基于 pluggy 开发的测试框架,这个也可以解释为什么说 pytest 是一个很灵活的测试框架, 支持很多插件 (https://docs.pytest.org/en/7.0.x/reference/ 阅读全文