@pytest.fixture(param=list|string) # 该装饰器表示当前方法传入的参数可被request.param访问,且在测试方法(test_开头的方法)中传入同名的方法(被fixture修饰的方法)可直接访问fixture修饰的方法的数据,描述的比较绕,标注理解(见图)

@pytest.fixture(param=list|string) # 该装饰器表示当前方法传入的参数可被request.param访问,且在测试方法(test_开头的方法)中传入同名的方法(被fixture修饰的方法)可直接访问fixture修饰的方法的数据,描述的比较绕,标注理解(见图)
本文标题:pytest 初始化和参数化
本文链接:https://www.haomeiwen.com/subject/wutssctx.html
网友评论