New issue 666: pytest.mark.skipif on class method uses "reason" from class 
level pytestmark
https://bitbucket.org/hpk42/pytest/issue/666/pytestmarkskipif-on-class-method-uses

Daniel Hahler:

Given the following test, the reason should be "function level", but is
reported as "class level":

    import pytest

    class Tests:
        pytestmark = [ pytest.mark.skipif(False, reason="class level"), ]

        @pytest.mark.skipif(True, reason="function level")
        def test_skip_if():
            pass


    % ~v/pytest % py.test test_skipif.py
    === test session starts ===
    platform linux -- Python 3.4.2 -- py-1.4.26 -- pytest-2.7.0.dev1
    collected 1 items 

    test_skipif.py s
    === short test summary info ==============================
    SKIP [1] /home/daniel/Vcs/pytest/_pytest/skipping.py:140: class level

    === 1 skipped in 0.01 seconds ============================

This is related to issue #665.


_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to