add a xfailing test for issue 199

This commit is contained in:
Ronny Pfannschmidt 2012-11-05 21:52:12 +01:00
parent 1a41c9c001
commit b3c8991b22
1 changed files with 19 additions and 0 deletions

View File

@ -237,6 +237,25 @@ class TestFunctional:
assert l[1].args == ()
assert l[2].args == ("pos1", )
@pytest.mark.xfail(reason='unfixed')
def test_merging_markers_deep(self, testdir):
# issue 199 - propagate markers into nested classes
p = testdir.makepyfile("""
import pytest
class TestA:
pytestmark = pytest.mark.a
def test_b(self):
assert True
class TestC:
# this one didnt get marked
def test_d(self):
assert True
""")
items, rec = testdir.inline_genitems(p)
for item in items:
print item, item.keywords
assert 'a' in item.keywords
def test_mark_with_wrong_marker(self, testdir):
reprec = testdir.inline_runsource("""
import pytest