1.参数化
作者:互联网
1.一个变量参数化
@pytest.mark.parametrize("password",["","opms123456"," opms123456"])
2.多个变量参数化:
@pytest.mark.parametrize("password,code",[("",0),("opms123456",1),(" opms123456",0)])
3.每个变量独立参数化
@pytest.mark.parametrize("names",["","libai","libai123"])
@pytest.mark.parametrize("password",["","opms123456"," opms123456"])
笛卡尔积乘积:3*3
标签:parametrize,opms123456,mark,pytest,参数,password 来源: https://www.cnblogs.com/wgsbg/p/16177192.html