Questions tagged [parametrize]
32 questions
0
votes
1 answer
Pytest: How to parametrize input
Is there a way to pass input to pytest.mark.parametrize()?
If I try…
import pytest
from typing import List
@pytest.mark.parametrize("rotation", range(len(input_sequence)))
def test_sequence_rotation(
input_sequence: List[float],
rotation:…

user2394284
- 5,520
- 4
- 32
- 38
0
votes
1 answer
Pytest parametrize run after the last iteration
When using @pytest.mark.parametrize('arg', param) is there a way to find out if the last item in param is being run? The reason I'm asking is I want to run a cleanup function unique to that test that should only run after the very last iteration of…

enchance
- 29,075
- 35
- 87
- 127