[Python] how to access index of the test in pytest.parametrize

Discussão em 'Python' iniciado por Stack, Setembro 3, 2025.

  1. Stack

    Stack Membro Participativo

    These decorators make 6 tests:

    @pytest.mark.parametrize("x", [0, 1])
    @pytest.mark.parametrize("y", [2, 3])
    @pytest.mark.parametrize("z", [4, 5])


    How inspect pytest to get current index or some ID of the test, inside the test body?

    Continue reading...

Compartilhe esta Página