@@ -387,7 +387,6 @@ def test_archival_to_version(key, value):
387
387
rec = testdir .inline_run ()
388
388
rec .assertoutcome (passed = 2 )
389
389
390
-
391
390
def test_parametrize_with_non_hashable_values_indirect (self , testdir ):
392
391
"""Test parametrization with non-hashable values with indirect parametrization."""
393
392
testdir .makepyfile ("""
@@ -415,7 +414,6 @@ def test_archival_to_version(key, value):
415
414
rec = testdir .inline_run ()
416
415
rec .assertoutcome (passed = 2 )
417
416
418
-
419
417
def test_parametrize_overrides_fixture (self , testdir ):
420
418
"""Test parametrization when parameter overrides existing fixture with same name."""
421
419
testdir .makepyfile ("""
@@ -443,7 +441,6 @@ def test_overridden_via_multiparam(other, value):
443
441
rec = testdir .inline_run ()
444
442
rec .assertoutcome (passed = 3 )
445
443
446
-
447
444
def test_parametrize_overrides_parametrized_fixture (self , testdir ):
448
445
"""Test parametrization when parameter overrides existing parametrized fixture with same name."""
449
446
testdir .makepyfile ("""
@@ -530,6 +527,32 @@ def test2(self, x, y):
530
527
assert colitems [2 ].name == 'test2[a-c]'
531
528
assert colitems [3 ].name == 'test2[b-c]'
532
529
530
+ def test_parametrize_with_marked_class (self , testdir ):
531
+ testdir .makepyfile ("""
532
+ import pytest
533
+
534
+ class A(object): pass
535
+
536
+ @pytest.mark.parametrize('a', [pytest.mark.xfail(A)])
537
+ def test_function(a):
538
+ assert False
539
+ """ )
540
+ reprec = testdir .inline_run ()
541
+ reprec .assertoutcome (skipped = 1 )
542
+
543
+ def test_parametrize_with_marked_function (self , testdir ):
544
+ testdir .makepyfile ("""
545
+ import pytest
546
+
547
+ def func(): pass
548
+
549
+ @pytest.mark.parametrize('a', [pytest.mark.xfail(func)])
550
+ def test_function(a):
551
+ assert False
552
+ """ )
553
+ reprec = testdir .inline_run ()
554
+ reprec .assertoutcome (skipped = 1 )
555
+
533
556
534
557
class TestSorting :
535
558
def test_check_equality (self , testdir ):
0 commit comments