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

Can't not apply multiple markers to individual test when using parametrize #379

Closed
pytestbot opened this issue Nov 2, 2013 · 1 comment
Labels
type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Lisa Wang (BitBucket: lisaeatsworld, GitHub: lisaeatsworld)


I tried to add multiple markers as document suggested as following

#!python

import pytest

@pytest.mark.parametrize(("n", "expected"), [
    (1, 2),
    pytest.mark.hello(pytest.mark.world((1, 3))),
    (2, 3),
])
def test_increment(n, expected):
     assert n + 1 == expected

But the test failed

============================= test session starts =============================
platform win32 -- Python 3.3.2 -- pytest-2.4.2
collected 3 items

test_bug.py .F.

================================== FAILURES ===================================
_____________________________ test_increment[1-3] _____________________________

n = 1, expected = 3

    @pytest.mark.parametrize(("n", "expected"), [
        (1, 2),
        pytest.mark.hello(pytest.mark.world((1, 3))),
        (2, 3),
    ])
    def test_increment(n, expected):
>        assert n + 1 == expected
E        assert (1 + 1) == 3

test_bug.py:9: AssertionError
===================== 1 failed, 2 passed in 0.07 seconds ======================

@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


This should be fixed on trunk, install with pip install -i https://devpi.net/hpk/dev/ -U pytest. Will be included in the next release.

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

1 participant