Skip to content

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

Closed

Description

@smarie

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.

Activity

  1. added
    bug
    on Feb 1, 2019
  2. smarie commented on Feb 1, 2019

    @smarie
    OwnerAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions