Skip to content

Commit

Permalink
add xfailing test for issue pytest-dev#568
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Jun 25, 2016
1 parent f2bb3df commit ab8ea46
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions testing/test_mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,31 @@ def test_bar(self): pass
items, rec = testdir.inline_genitems(p)
self.assert_markers(items, test_foo=('a', 'b'), test_bar=('a',))


@pytest.mark.issue586
@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
""")
(base_item, sub_item, sub_item_other), rec = testdir.inline_genitems(p)
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
Expand Down

0 comments on commit ab8ea46

Please sign in to comment.