摘要: 实际工作场景中如何使用通过conftest.py 和 @pytest.fixture() 结合使用,实现全局的前置应用(比如:项目的全局登录,模块的全局处理) 1.conftest.py 文件是单独存放的一个夹具配置文件,名称是不能更改。2.作用:可以在不同的py文件中使用同一个fixture函数3 阅读全文
posted @ 2022-04-01 17:06 冬天里的狐狸 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 一、@pytest.fixture()的5个参数含义@pytest.fixture(scope="", params="", autouse="", ids="", name="")1scope:表示被@pytest.fixture()方法标记的作用域。functions(默认)、class、mou 阅读全文
posted @ 2022-04-01 17:04 冬天里的狐狸 阅读(70) 评论(0) 推荐(0) 编辑
摘要: """A TestRunner for use with the Python unit testing framework. Itgenerates a HTML report to show the result at a glance.The simplest way to use this 阅读全文
posted @ 2022-04-01 14:43 冬天里的狐狸 阅读(84) 评论(0) 推荐(0) 编辑