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 doesn't work on a list of markers as suggested in the documentation #2133

Closed
swapnamishra opened this issue Dec 13, 2016 · 2 comments

Comments

@swapnamishra
Copy link

swapnamishra commented Dec 13, 2016

pytestmark = [pytest.mark.sm3, pytest.mark.sm2]
def test_function(self):
        assert True

@pytest.mark.sm1
def test_function(self):
        assert True

The command py.test -v -m "sm1" executes all tests and ignores the tags or should i say the -m option doesn't work at all.

(edited by @RonnyPfannschmidt to use a code block)

@RonnyPfannschmidt
Copy link
Member

at first glance your example code has 2 functions named the same, thus the second one overriding the prior one (as python itself behaves that way)

please provide a full demonstrating example and your py.test output of that example

@RonnyPfannschmidt
Copy link
Member

closing due to lack of feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants