[py-svn] commit/pytest: RonnyPfannschmidt: add a xfailing test for issue 199

Bitbucket commits-noreply at bitbucket.org
Mon Nov 5 21:52:19 CET 2012


1 new commit in pytest:


https://bitbucket.org/hpk42/pytest/changeset/273a571c618f/
changeset:   273a571c618f
user:        RonnyPfannschmidt
date:        2012-11-05 21:52:12
summary:     add a xfailing test for issue 199
affected #:  1 file

diff -r 661a745645796f8e3221f35b95468e27753c6900 -r 273a571c618fa2f153de117ef86e78ae2907893b testing/test_mark.py
--- a/testing/test_mark.py
+++ b/testing/test_mark.py
@@ -237,6 +237,25 @@
         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

Repository URL: https://bitbucket.org/hpk42/pytest/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the pytest-commit mailing list