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

The parametrization order appears to be random when @pytest_fixture_plus is used with several @pytest.mark.parametrize #22

Closed
smarie opened this issue Feb 1, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@smarie
Copy link
Owner

smarie commented Feb 1, 2019

Consider the following example:

A = [1, 2]
B = [10, 20]

@pytest_fixture_plus
@pytest.mark.parametrize("a", A)
@pytest.mark.parametrize("b", B)
def my_fix(a, b):
    return a + b

def test_my_fix(my_fix):
    pass

The order of execution will randomly be 1-10, 1-20, 2-10, 2-20 or 10-1, 10-2, 20-1, 20-2.

@smarie smarie added the bug Something isn't working label Feb 1, 2019
@smarie
Copy link
Owner Author

smarie commented Feb 1, 2019

This was a stupid error in the code: a dict was used instead of an OrderedDict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant