Skip to content

[Doc] Parametrize matrix order appers inverted in doc #3001

@GeorgeFischhof

Description

@GeorgeFischhof

[Doc] Parametrize matrix order appers inverted in doc

Hi there,

the page on the following url (and maybe other parts are affected too):
https://docs.pytest.org/en/latest/parametrize.html
says :

import pytest
@pytest.mark.parametrize("x", [0, 1])
@pytest.mark.parametrize("y", [2, 3])
def test_foo(x, y):
    pass
This will run the test with the arguments set to x=0/y=2, x=0/y=3, x=1/y=2 and x=1/y=3

But the inner and outer cycles are in reverse order; the actual and expected result is:

test_foo[2-0]
test_foo[2-1]
test_foo[3-0]
test_foo[3-1]

Used:
Python 3.6.1
latest pytest
windows 7

BR,
George

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueeasy issue that is friendly to new contributorstatus: help wanteddevelopers would like help from experts on this topictype: docsdocumentation improvement, missing or needing clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions