【Pytest篇】pytest配置文件之conftest.py

背景:

conftest.py是pytest特有的本地测试配置文件,既可以用来设置项目级别的fixture,也可以用来导入外部插件。

名称:conftest.py文件名称是固定的,不可随意更改,pytest会自动识别该文件。

作用范围:conftest.py只作用于它所在的目录及子目录。

猜你喜欢

转载自blog.csdn.net/weixin_46361114/article/details/120625213