From 95b83958f49d2a247e0fdb322bcc54de47b89e67 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Sat, 25 Jun 2016 11:10:23 +0200 Subject: [PATCH] add xfailing test for issue #568 --- testing/test_mark.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/testing/test_mark.py b/testing/test_mark.py index 9b3e15b37e3..cf7dc6f169a 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -418,6 +418,32 @@ def test_bar(self): pass items, rec = testdir.inline_genitems(p) self.assert_markers(items, test_foo=('a', 'b'), test_bar=('a',)) + + @pytest.mark.issue568 + @pytest.mark.xfail(reason="markers smear, needs fixing") + def test_mark_decorator_subclass_does_not_propagate_to_base2(self, testdir): + p = testdir.makepyfile(""" + import pytest + + class TestBase: + def test_foo(self): + pass + + @pytest.mark.b + class TestSub(TestBase): + pass + + + class TestOtherSub(TestBase): + pass + + """) + items, rec = testdir.inline_genitems(p) + base_item, sub_item, sub_item_other = items + assert not hasattr(base_item.obj, 'b') + assert not hasattr(sub_item_other.obj, 'b') + + def test_mark_decorator_baseclasses_merged(self, testdir): p = testdir.makepyfile(""" import pytest