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