don't apply marks directly in pytest

specifically - don't use `pytest.mark.xfail` directly in parametrize,
instead use `pytest.param(*args, marks=pytest.mark.xfail)`. the old way
is deprecated in pytest4 - for more information see
https://docs.pytest.org/en/latest/deprecations.html#marks-in-pytest-mark-parametrize

Also, make this an error in pytest.ini so if someone adds a new xfail,
it'll crash
This commit is contained in:
Leo Hemsted
2018-12-31 13:10:19 +00:00
parent 85aae47443
commit 5961f470a4
4 changed files with 22 additions and 18 deletions

View File

@@ -11,3 +11,6 @@ env =
ZENDESK_API_KEY=test
STATSD_PREFIX=stats-prefix
REDIS_ENABLED=0
filterwarnings =
error:Applying marks directly:pytest.RemovedInPytest4Warning