Skip to content

Commit 7ecb049

Browse files
committed
Fixing tests to use pytest.param(..., marks=...) rather than deprecated pytest.mark....(...)
1 parent f7fb1a7 commit 7ecb049

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_lazyfixture.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def zero(request):
373373
return request.param
374374
375375
@pytest.mark.parametrize(('a', 'b'), [
376-
pytest.mark.xfail((1, pytest.lazy_fixture('zero')), reason=ZeroDivisionError)
376+
pytest.param(1, pytest.lazy_fixture('zero'), marks=pytest.mark.xfail(reason=ZeroDivisionError))
377377
])
378378
def test_division(a, b):
379379
division(a, b)
@@ -411,7 +411,7 @@ def one():
411411
return 1
412412
413413
@pytest.mark.parametrize('a', [
414-
pytest.mark.skip(pytest.lazy_fixture('one'), reason='skip')
414+
pytest.param(pytest.lazy_fixture('one'), marks=pytest.mark.skip(reason='skip'))
415415
])
416416
def test_skip1(a):
417417
assert a == 1
@@ -447,7 +447,7 @@ def test_model_a(self, a):
447447
assert a == 1
448448
449449
@pytest.mark.parametrize('a', [
450-
pytest.mark.skip(pytest.lazy_fixture('one'), reason='skip this')
450+
pytest.param(pytest.lazy_fixture('one'), marks=pytest.mark.skip(reason='skip this'))
451451
])
452452
def test_model_b(self, a):
453453
assert a == 1

0 commit comments

Comments
 (0)