Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest.mark.skipif on class method uses "reason" from class level pytestmark #666

Closed
pytestbot opened this issue Jan 23, 2015 · 1 comment
Labels
type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Daniel Hahler (BitBucket: blueyed, GitHub: blueyed)


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.


@pytestbot pytestbot added the type: bug problem that needs to be addressed label Jun 15, 2015
@nicoddemus
Copy link
Member

Fixed by #865

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

2 participants