Fix pytest "Applying marks directly to parameters" deprecation

This commit is contained in:
Mads Marquart
2018-12-09 15:02:48 +01:00
parent 89a277c354
commit 3443a233f4
5 changed files with 24 additions and 14 deletions

View File

@@ -11,8 +11,14 @@ from time import time
@pytest.fixture(scope="module", params=[
Plan(int(time()) + 100, random_hex()),
pytest.mark.xfail(Plan(int(time()), random_hex()), raises=FBchatFacebookError),
pytest.mark.xfail(Plan(0, None)),
pytest.param(
Plan(int(time()), random_hex()),
marks=[pytest.mark.xfail(raises=FBchatFacebookError)]
),
pytest.param(
Plan(0, None),
marks=[pytest.mark.xfail()],
),
])
def plan_data(request, client, user, thread, catch_event, compare):
with catch_event("onPlanCreated") as x: