对一个参数进行参数化
@pytest.mark.parametrize('password',["112312","123456","aqww12"]) def test_1(password): a = lo.login_post("username",password) assert a== "用户名或密码错误"
对多个参数进行参数化
@pytest.mark.parametrize('user,password',[("test","112312"),("test3","123456"),("admin","aqww12")]) def test_1(user,password): a = lo.login_post(user,password) assert a== "用户名或密码错误"