Skip to content

Commit

Permalink
Merge pull request #1659 from RonnyPfannschmidt/failtest-586
Browse files Browse the repository at this point in the history
xfailing test for #568
  • Loading branch information
nicoddemus committed Jun 27, 2016
2 parents 44695ae + 76756c0 commit ccd395f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions testing/test_mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 on methods of base classes")
def test_mark_should_not_pass_to_siebling_class(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
Expand Down

0 comments on commit ccd395f

Please sign in to comment.